Use Selection.SetAsText or Selection::SetAsText which takes a String Expression as input:
// C++ API Application app; Model root = app.GetActiveSceneRoot(); X3DObject myGrid; root.AddGeometry( L"Grid", L"NurbsSurface", L"myGrid", myGrid ); X3DObject myCylinder; root.AddGeometry( L"Cylinder", L"MeshSurface", L"myCylinder", myCylinder ); Selection sel( app.GetSelection() ); sel.SetAsText( L"myGrid,myCylinder" ); // C# CXSIApplication app = new CXSIApplication(); Model root = app.ActiveSceneRoot; X3DObject myGrid = root.AddGeometry("Grid", "NurbsSurface", "myGrid"); X3DObject myCylinder = root.AddGeometry("Cylinder", "MeshSurface", "myCylinder"); Selection sel = app.Selection; sel.SetAsText(myGrid.Name + "," + myCylinder.Name); // JScript var myGrid = ActiveSceneRoot.AddGeometry( "Grid", "NurbsSurface" ); var myCylinder = ActiveSceneRoot.AddGeometry( "Cylinder", "MeshSurface" ); Selection.SetAsText( myGrid + "," + myCylinder ); ' VBScript set myGrid = ActiveSceneRoot.AddGeometry( "Grid", "NurbsSurface" ) set myCylinder = ActiveSceneRoot.AddGeometry( "Cylinder", "MeshSurface" ) Selection.SetAsText myGrid & "," & myCylinder # Python app = Application myGrid = app.ActiveSceneRoot.AddGeometry( "Grid", "NurbsSurface" ) myCylinder = app.ActiveSceneRoot.AddGeometry( "Cylinder", "MeshSurface" ) app.Selection.SetAsText( "%s,%s" %(myGrid.Name,myCylinder.Name) ) # Perl my $app = $Application; my $myGrid = $app->ActiveSceneRoot->AddGeometry( "Grid", "NurbsSurface" ); my $myCylinder = $app->ActiveSceneRoot->AddGeometry( "Cylinder", "MeshSurface" ); $app->Selection->SetAsText( $myGrid->Name.",".$myCylinder->Name );
SelectAllUsingFilter, SelectGeometryComponents, SelectAdjacent
ToggleSelection, ToggleObjectComponentSelectionFilter, ToggleParameterValue, SetAndToggleSelection
ActivateElements, SetActiveElements, ToggleActiveElements, SetAndToggleActiveElements
ConvertSelection, ConvertSelectionToEdges, ConvertSelectionToPoints, ConvertSelectionToPolygons