08-16-2018
03:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-16-2018
03:17 AM
Hello together,
i need your your help. I like to drive, move and rotate constraints with ilogic. The following code rotates all of the driven constraints. The code shouldt be drive only a constraint named "move1" vertical from 0 to 155 and rotated an other constraint named "rotate1" from 0 to 45 degree. Is that possible?
And another question: The code rotates clockwise from 0 to 45 degree. Is it possible to rotate from 0 to -45?
Thanks in advance
Regards Martin
Sub Main()
Dim assyDoc As AssemblyDocument
assyDoc = ThisApplication.ActiveDocument
Dim oConstraint As AssemblyConstraint
For Each oConstraint In assyDoc.ComponentDefinition.Constraints
If oConstraint.DriveConstraintSettings.IsInitialized Then
With oConstraint.DriveConstraintSettings
.StartValue = 0
.EndValue = 45
.GoToStart
.PlayForward
' .StartValue = 0
' .EndValue = 150
' .GoToEnd
' .PlayReverse
End With
End If
Next
End Sub
Solved! Go to Solution.