Moving Ordinate Dimension Set Jog Point causing Inventor Crash

Moving Ordinate Dimension Set Jog Point causing Inventor Crash

BrandonBibelhauser
Participant Participant
213 Views
1 Reply
Message 1 of 2

Moving Ordinate Dimension Set Jog Point causing Inventor Crash

BrandonBibelhauser
Participant
Participant

Trying to reposition the Jog Points of an Ordinate Dimension set but Inventor crashes.  Moving the text has been successful but continually crashes with jog points.  

 

There maybe something outside the code that is an issue considering this code works for a colleague.

 

Any thoughts?

 

Here is the basic code to test the concept, the crash occurs at 'oOrdDimSet.OriginMember.JogPointTwo = oPos':

Sub AdjustOrdinateDimensionJogPoints3()
On Error GoTo ErrorHandler
    Dim doc As DrawingDocument
    Set doc = ThisApplication.ActiveDocument
    If doc Is Nothing Then
        MsgBox "No active document found.", vbExclamation
        Exit Sub
    End If
    Dim oSheet As Sheet
    Set oSheet = doc.ActiveSheet
    If oSheet Is Nothing Then
        MsgBox "No active sheet found.", vbExclamation
        Exit Sub
    End If
    Dim oOrdDimSet As OrdinateDimensionSet
    Dim oDim As OrdinateDimension
    Set oDim = oSheet.DrawingDimensions.item(1)
    If oDim.IsOrdinateSetMember Then
      oDim.HideValue = True
      Set oOrdDimSet = oDim.OrdinateDimensionSet
      If oDim Is Nothing Then
          MsgBox "No ordinate dimension found on the active sheet.", vbExclamation
          Exit Sub
      End If
      Dim oPos, oPos1 As Point2d
      Set oPos = oOrdDimSet.OriginMember.JogPointTwo
      Set oPos1 = oOrdDimSet.OriginMember.Text.Origin
      oPos.Y = oPos.Y + 1
      oPos1.Y = oPos.Y + 5
'    Debug.Print "oPos.X: " & oPos.X
      Debug.Print "oPos.Y: " & oPos.Y
      oOrdDimSet.OriginMember.Text.Origin = oPos1
      oOrdDimSet.OriginMember.JogPointTwo = oPos
      Debug.Print "oOrdDimSet.JogPointTwo: " & oOrdDimSet.OriginMember.JogPointTwo.Y
    End If
ErrorHandler:
 
 
End Sub

 

0 Likes
Accepted solutions (1)
214 Views
1 Reply
Reply (1)
Message 2 of 2

BrandonBibelhauser
Participant
Participant
Accepted solution

This has been resolved by updating my Inventor release to 2021.5.2.

0 Likes