NewScene , false
Dim oRoot, oNull, oSphere
set oRoot = Application.ActiveProject.ActiveScene.Root
set oNull = oRoot.AddNull
set oSphere = oRoot.AddGeometry("Sphere","MeshSurface")
oSphere.Kinematics.AddConstraint "Direction", oNull
oSphere.Kinematics.AddConstraint "Direction", oNull
oSphere.Kinematics.AddConstraint "Direction", oNull
set oConstraints = oSphere.Kinematics.Constraints
Application.LogMessage typename(oConstraints)
for each oCns in oConstraints
Application.LogMessage oCns.Name & ", Constrained : " & oCns.Constrained
Application.LogMessage "Constraining : "
for each oConstraining in oCns.Constraining
Application.LogMessage oConstraining
next
next
' Expected results:
'INFO : ConstraintCollection
'INFO : Direction Cns, Constrained : sphere
'INFO : Constraining :
'INFO : null
'INFO : Direction Cns, Constrained : sphere
'INFO : Constraining :
'INFO : null
'INFO : Direction Cns, Constrained : sphere
'INFO : Constraining :
'INFO : null |