Creates a new lattice given a preset name/object and a name, the input object(s) are connected to the new lattice object. A lattice object is used to control lattice deformations.

Scripting Syntax

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

Return Value



Parameter Type Description
Preset Lattice Primitive Preset Preset for the lattice

Possible Values:


Lattice Lattice (only supported preset for this method)
Items XSICollection or X3DObject An X3DObjectCollection or a single X3DObject
Name String Name of the new lattice


1. JScript Example

NewScene( null, false );
var oCube = Application.ActiveSceneRoot.AddGeometry( "Cube", "NurbsSurface" );
var oCone = Application.ActiveSceneRoot.AddGeometry( "Cone", "NurbsSurface" );
var oList = new ActiveXObject( "XSI.Collection" );
oList.Add( oCone );
oList.Add( oCube );
var oLat = Application.ActiveSceneRoot.AddLattice( "Lattice", oList, "MyConeCubeLattice" );

2. 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 oLat = oRoot.AddLattice( "Lattice", oList, "MyConeCubeLattice" )