## Instantiate

### Introduced

v3.0

### Description

Instantiates objects, with options for multiple instances and additional transform controls.

### Scripting Syntax

    oReturn = Instantiate( [InputObjs], [NbItems], [Hierarchy], [Grouping], [Selection], [Xfrom], [Sx], [Sy], [Sz], [Rx], [Ry], [Rz], [Tx], [Ty], [Tz], [TrackXform] );

### Return Value

Returns an XSICollection object that contains the list of instances.

### Parameters

Parameter | Type | Description
--- | --- | ---
InputObjs | String | List of objects to instantiate Default Value: Current selection
NbItems | Long | Number of instances to create Default Value: 1
Hierarchy | siDupParent | How to parent instances Default Value: siNoParent
Grouping | siDupGroup | How to group instances Default Value: siNoGrouping
Selection | siDupSelection | How to select instances Default Value: siSetSelection
Xfrom | siDupTransform | How to distribute instances using transform Default Value: siGlobalXForm
Sx | Number | Scaling x value Default Value: 1.0
Sy | Number | Scaling y value Default Value: 1.0
Sz | Number | Scaling z value Default Value: 1.0
Rx | Number | Rotation x value Default Value: 0.0
Ry | Number | Rotation y value Default Value: 0.0
Rz | Number | Rotation z value Default Value: 0.0
Tx | Number | Translation x value Default Value: 0.0
Ty | Number | Translation y value Default Value: 0.0
Tz | Number | Translation z value Default Value: 0.0
TrackXform | Boolean | Track placement. Default Value: True

### Examples

#### VBScript Example

    ' Create 6 instances

    ' Position them 3 units apart (each duplicate will be translated 3 units along the X axis from its predecessor)

    ' The transforms are applied relative to the previous duplicate

    ' For example, if the original is positioned at (0,0,0), then the duplicates are positioned at

    ' (3,0,0), (6,0,0), (9,0,0),..., (18,0,0)

    dim object, list

    set object = CreatePrim( "Sphere", "NurbsSurface" )

    SetValue object & ".sphere.radius", 1.000

    CreateModel "Sphere"

    Instantiate "Model", 6, -1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 3, 0, 0, True

### See Also

SIInstantiate Clone GetMaster GetInstances