Kinematics.Constraints

Description

Returns a ConstraintCollection containing each Constraint object that is constraining the parent of this object.

Examples

VBScript Example

Dim oRoot, oNull, oSphere
set oRoot = Application.ActiveProject.ActiveScene.Root
set oNull = oRoot.AddNull
set oSphere = oRoot.AddGeometry("Sphere","MeshSurface")
oSphere.Kinematics.AddConstraint "Position", oNull, False, Array(0,45.0,90.0)
oSphere.Kinematics.AddConstraint "Direction", oNull
logmessage "Number of constraints on oSphere: " & oSphere.Kinematics.Constraints.Count
for each cns in oSphere.Kinematics.Constraints
        logmessage "oSphere's constraint: " & cns.FullName
next

See Also

Constraint.Constraining