TogglePinObjectInPosition
 
 
 

TogglePinObjectInPosition

Description

Sets a position constraint to a temporary primitive to pin an object to its current location. If the object is already 'pinned' then the constraint and temporary primitive are removed.

Scripting Syntax

TogglePinObjectInPosition( [ConstrainedObj] );

Parameters

Parameter Type Description
ConstrainedObj String List of objects to be pinned.

Default Value: Selected objects

Examples

VBScript Example

CreatePrim "Cube", "MeshSurface"
SetValue "cube.cube.length", 3.5
Translate , 2, 3, 0, siRelative, siView, siObj, siXYZ
' toggle pin on
TogglePinObjectInPosition "cube"
Refresh
' object will not move
Translate , -5, 1, 0, siRelative, siView, siObj, siXYZ
Refresh
' toggle pin off
TogglePinObjectInPosition "cube"
' object will now move
Translate , -5, 1, 0, siRelative, siView, siObj, siXYZ

See Also

RemoveCns SIApplyConstraint SIApplyCns