Returns the parameter's script name as a String. You use the script name of a
parameter in scripting (for example, with the SetValue command) and to specify
which parameter you want to access from the ParameterCollection.
The actual name (SIObject.Name) of
the parameter is the name that appears in the scene explorer
(unless Show Script Names is enabled) but the script name is logged
to the history pane of the Script Editor.
Note: For custom properties, when you create a new custom parameter
with the CustomProperty.AddParameter
method, you can define the script name with the ScriptName
parameter and the actual name with the Name parameter.
' ' This example shows how the Name, ScriptName, and Description can be different ' for a custom parameter ' NewScene , false dim oRoot, oPropSet, oProp set oRoot = Application.ActiveProject.ActiveScene.Root set oPropSet = oRoot.AddProperty( "Custom_parameter_list", , "DemoPropertyNaming" ) set oProp = oPropSet.AddParameter( "MyScriptName", siString , , , _ "ParameterShortName", "Longer Parameter Description" ) ' Will print "ParameterShortName" Application.LogMessage oProp.Name ' Will print "MyScriptName" Application.LogMessage oProp.ScriptName ' Will print "Longer Parameter Description" Application.LogMessage oProp.Description |
' ' This example demonstrates the relationship between the ' actual name and the script name of a built-in parameter ' NewScene , false set oDisc = Application.ActiveSceneRoot.AddGeometry( "Disc", "MeshSurface" ) getInfo oDisc ' Get the Render Visibility parameter (using the Name property) ' and print its name info set oParam = oDisc.Properties( "Visibility" ).Parameters( "rendvis" ) getInfo oParam ' Convenience function function getInfo( in_object ) Application.LogMessage in_object.Name Application.LogMessage in_object.FullName ' This ensures that you only try to use the ScriptName ' property on a Parameter object if Application.ClassName( in_object ) = "Parameter" then Application.LogMessage in_object.ScriptName end if end function ' Expected results: 'INFO : "disc" 'INFO : "disc" 'INFO : "Render Visibility" 'INFO : "disc.visibility.rendvis" 'INFO : "rendvis" |