Creates a new control primitive given a preset name/object and a name, the input object(s) are connected to the new control object. A Control object is a non-renderable object that can affect other objects, for example by creating a wave deformation or defining a physical force.

C# Syntax

X3DObject X3DObject.AddControl( Object in_ctrlPreset, Object in_inputObjects, String in_name );

Scripting Syntax

oReturn = X3DObject.AddControl( Preset, [Items], [Name] );

Return Value



Parameter Type Description
Preset Control Object Primitive Preset Preset for type of Control

Possible Values:


Attractor Attractor control object
Drag Drag control object
Eddy Eddy control object
Fan Fan control object
Gravity Gravity control object
SphereVolume Volume deform control object
ToricForce Toric force control object
Turbulence Turbulence control object
Vortex Vortex control object
Wave Wave control object
Wind Wind control object
Items XSICollection or X3DObject A collection of X3DObject or a single X3DObject
Name String Name of the new control


VBScript Example

NewScene , false
set oRoot = Application.ActiveProject.ActiveScene.Root
set oCube = oRoot.AddGeometry( "Cube", "NurbsSurface" )
set oCone = oRoot.AddGeometry( "Cone", "NurbsSurface" )
set oList = CreateObject("XSI.Collection")
oList.Add oCone
oList.Add oCube
set oControl = oRoot.AddControl( "Wave", oList, "MyWave" )