ActionDelta.AddConstraintItem

Description

Adds a new ActionDeltaItem of type siModificationDeltaConstraint to an ActionDelta created with the Delta.AddAction method.

The ActionDelta should be of type siModificationDeltaConstraint to use this method (see siModificationDeltaType for a list of ActionDelta types).

Scripting Syntax

oReturn = ActionDelta.AddConstraintItem( Preset, Targets, Sources, [Compensation], [TargetOffset], [SourceOffset] );

Return Value

ActionDeltaItemCollection

Parameters

Parameter Type Description
Preset Constraint Preset Type of constraint to add to object
Targets X3DObject, X3DObjectCollection or XSICollection Object(s) that will be constrained (see Constraint.Constrained)
Sources X3DObject, X3DObjectCollection or XSICollection Object(s) that will act as constrainers (see Constraint.Constraining)
Compensation Boolean Compensation mode, True to turn on compensation.

Default Value: False

TargetOffset SIVector3 or Array Target Attachment Point (Distance, Position constraints).
SourceOffset SIVector3 or Array Source Attachment Point (Distance, Position, Surface, Trajectory constraints). Rotation Offset (Orientation constraint), Translation Offset (Direction constraint), Scaling Offset (Scaling constraint)

Examples

JScript Example

/* 
        See the example on the documentation page for the ActionDelta object 
*/

See Also

Delta.AddAction ActionDeltaCollection