Command.ScriptingName

Description

Returns and sets the scripting name for the command as a String.

The scripting name is used for executing a scripting command ('ApplyOp "Twist"'). This differs from the actual name of the command which you use to identify a specific command from the command collection using the Name property. For more information, see the description and examples for the SIObject.Name property.

C# Syntax

// get accessor
String rtn = Command.ScriptingName;
// set accessor
Command.ScriptingName = String;

Examples

VBScript Example

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' This example demonstrates the relationship between the 
' Twist command and the operator that results from it, 
' particularly concerning the name information.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set oDisc = Application.ActiveSceneRoot.AddGeometry( "Disc", "MeshSurface" )
Selection.Add oDisc
' Apply the twist operator after printing the name information
set oCmd = Application.Commands( "Twist" )
getInfo oCmd
' When Softimage runs this command, the following message is logged
' to the history pane of the Script Editor:
'	ApplyOp "Twist", "disc", 3, siPersistentOperation
oCmd.Execute
' Get the operator that was just created from the operator 
' stack (the ConstructionHistory object) and print the name
' information for the operator
set oStack = oDisc.ActivePrimitive.ConstructionHistory
for each oOp in oStack
	if oOp.Name = "Twist Op" then
		set oTwistOp = oOp
	end if
next
getInfo oTwistOp
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function getInfo( in_object )
	Application.LogMessage in_object.Name
	Application.LogMessage in_object.FullName
	' This ensures that you only try to use the ScriptingName
	' property on a Command object
	if ClassName( in_object ) = "Command" then
		Application.LogMessage in_object.ScriptingName
	end if
end function
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Output of above script is:
'INFO : "Twist"
'INFO : "Twist"
'INFO : "ApplyOp"
'INFO : "Twist Op"
'INFO : "disc.polymsh.twistop"

See Also

SIObject.Name CommandCollection.Item XSIApplication.GetCommandByScriptingName