Sets the selection by parsing a given string. SetAsText allows
you to set the selection using the string path names for object names as is shown in the
scripting history window. The string list is comma separated. You
may use wildcards in the string to match many object for example
"light*".
This is the equivalent of using the AddToSelection command with a
list of objects.
Selection.SetAsText( Text ); |
Parameter | Type | Description |
---|---|---|
Text | String | Object names to convert to selection." |
set root = ActiveSceneRoot root.AddGeometry "Cube", "MeshSurface", "myCube" root.AddGeometry "Grid", "NurbsSurface", "myGrid" root.AddGeometry "Cylinder", "MeshSurface", "myCylinder" set sel = Selection sel.SetAsText "myCube,myGrid,myCylinder" LogMessage "Selection count: " & sel.Count 'INFO : "Selection count: 3" for each item in sel LogMessage "Selection " & i & "= " & item.FullName next 'INFO : "Selection 0= myCube" 'INFO : "Selection 1= myGrid" 'INFO : "Selection 2= myCylinder" |