Selecting a Single Item (Adding to the Selection)

 
 
 
// C++ API
Application app;
Model root = app.GetActiveSceneRoot();
X3DObject myGrid;
root.AddGeometry( L"Grid", L"NurbsSurface", L"myGrid", myGrid );
Selection sel( app.GetSelection() );
sel.Add( myGrid );

// C#
CXSIApplication app = new CXSIApplication();
Model root = app.ActiveSceneRoot;
X3DObject myGrid = root.AddGeometry("Grid", "NurbsSurface", "myGrid");
Selection sel = app.Selection;
sel.Add(myGrid, siSelectMode.siSelectDefault);

// JScript
var myGrid = ActiveSceneRoot.AddGeometry( "Grid", "NurbsSurface" );
Selection.Add( myGrid );

' VBScript
set myGrid = ActiveSceneRoot.AddGeometry( "Grid", "NurbsSurface" )
Selection.Add myGrid

# Python
app = Application
myGrid = app.ActiveSceneRoot.AddGeometry( "Grid", "NurbsSurface" )
app.Selection.Add( myGrid )

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License