Adds a constraint to the 3d object.
Constraint Kinematics.AddConstraint( Object in_cnsPreset, Object in_cnsning, Boolean in_bComp, Object in_offsetCnsned, Object in_offsetCnsning ); |
oReturn = Kinematics.AddConstraint( Preset, Sources, [Compensation], [TargetOffset], [SourceOffset] ); |
Parameter | Type | Description |
---|---|---|
Preset | String or preset object (see SIGetPreset) or Expression | Constraint Preset to add to object |
Sources | X3DObject, X3DObjectCollection or XSICollection | Object(s) that will act as constrainers |
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) |
Dim oRoot, oNull, oSphere set oRoot = Application.ActiveProject.ActiveScene.Root set oNull = oRoot.AddNull set oSphere = oRoot.AddGeometry("Sphere","MeshSurface") set oConstaint = oSphere.Kinematics.AddConstraint( "Position", oNull, False, Array(0,45.0,90.0) ) |