makeAnimatableObject

Syntax

<Path>.makeAnimatableObject(ObjectName:string, ExtractAtBoundingBoxBase:boolean[, ExtractionOffset:length[3]) → any

The method makeAnimatableObject creates an animatable object for the object designated by <Path>.

Note:

The method deactivated graphic inheritance.

Note:

You cannot assign the method when the graphic is an automatically generated graphic group or when the graphic is located in an automatically generated graphic group.

Parameters

  • The parameter ObjectName of data type string sets the name of the animatable object.

  • The parameter ExtractAtBoundingBoxBase of data type real sets if the insertion position of the new object is determined based on the bounding box of the graphic (true) or not (false).

  • The optional parameter ExtractionOffset is an array of data type length with three values which sets the offset of the insertion position. If you do not specify the value, the method uses the values [0,0,0].

Return Value

The return value of data type any designates the newly created animatable object.

Example

var tool := MyStation._3D.getGraphic("default", ["tool"]).makeAnimatableObject("toolHead",true, [0,0,0]) 
tool.JointType := "Revolute Joint"
MyStation._3D.getGraphic("default", ["tool"]).makeAnimatableObject("toolHead",true, [0,0,0]) 
MyStation._3D.getObject("toolHead").JointType := "Revolute Joint" 
-- This line of code accomplishes the same as the second line of code in the first example

Related Topics

Make Animatable Object

_3D.deleteObject

_3D.getObject

_3D.addObject