- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In an attempt to develop a work around for this identified bug in another post...
Since I know I can make desired angle changes on a polar axis in small increments (less than 90 degrees), I'm attempting to create an iLogic loop to step the incremental changes in hopes of achieving my goal of rotating parts & features more than 90 degrees without constraint failures. Unfortunately this is still failing since I believe iLogic is running faster than the model refresh. I can accomplish my goal if I manually manipulate the angle changes since the graphics have plenty of time to update between my keystrokes.
I've put in some update & rebuild commands into the loop, but they don't appear to help. Any suggestions on how I might be able to slow down iLogic long enough for the updates to process? Here's my current code...
'Angle manager If SpanAngle/(FlatAngle*2) = Fix(SpanAngle/(FlatAngle*2)) Then IsHalfAngle = False Else IsHalfAngle = True If SpanAngle < FlatAngle Then SpanAngle = FlatAngle 'ensure min angle is present If SpanAngle/FlatAngle <> Fix(SpanAngle/FlatAngle) Then SpanAngle = FlatAngle * 3 'ensure angle has correct increment FocusAngle = Round(((FlatFocus-1)*(FlatAngle/1 deg)+90)*10)/10*1 deg 'convert flat # to angle value If FocusAngle >= 360 deg Then FocusAngle = Round(((FocusAngle/1 deg) - 360)*10)/10*1 deg'keep value in range of 0-359 degrees While CurAngle <> FocusAngle 'begin stepped angle loop CurAngle = CurAngle + FlatAngle 'increase by next angle increment Dim oTemp1 As Double = 0 Dim oTemp2 as Double = 0 If CurAngle >= 360 Then CurAngle = Round((CurAngle - 360)*10)/10 'keep value in range of 0-359 degrees If CurAngle < 0 Then CurAngle = Round((CurAngle + 360)*10)/10 If IsHalfAngle = False Then 'if angle spread is equal oTemp1 = CurAngle + (SpanAngle/2) oTemp2 = CurAngle - (SpanAngle/2) Else If IsHalfAngle = True And AngleAdjDirection = "Left" Then oTemp1 = Round((CurAngle + (Ceil(SpanAngle/FlatAngle/2)*FlatAngle))*10)/10 'if not, adjust left (clockwise) oTemp2 = Round((CurAngle - (Floor(SpanAngle/FlatAngle/2)*FlatAngle))*10)/10 Else oTemp1 = Round((CurAngle + (Floor(SpanAngle/FlatAngle/2)*FlatAngle))*10)/10 'if not, adjust right (ccw) oTemp2 = Round((CurAngle - (Ceil(SpanAngle/FlatAngle/2)*FlatAngle))*10)/10 End If If oTemp1 >= 360 Then oTemp1 = Round((oTemp1 - 360)*10)/10 'keep value in range of 0-359 degrees If oTemp2 >= 360 Then oTemp2 = Round((oTemp2 - 360)*10)/10 If oTemp1 < 0 Then oTemp1 = Round((oTemp1 + 360)*10)/10 If oTemp2 < 0 Then oTemp2 = Round((oTemp2 + 360)*10)/10 LeftAngle = oTemp1 'rotate/update planes RightAngle = oTemp2 Parameter.UpdateAfterChange = True ThisDoc.Document.Rebuild() 'force rebuild End While

Solved! Go to Solution.