Dimensions having gaps in dimension line

Dimensions having gaps in dimension line

Tiffany_Hayden_
Collaborator Collaborator
336 Views
2 Replies
Message 1 of 3

Dimensions having gaps in dimension line

Tiffany_Hayden_
Collaborator
Collaborator

Hi - 

I'm creating dimensions through the API and I noticed when I do, sometimes, there is a gap in the dimension. I've tried to run a sheet update after placing the dim but it doesn't help. If I move the dim manually after the automation has run it completes the line and everything looks good. Anyone ran into this yet? 

 

TiffanyHaydenSWQYG_0-1639411582391.png

 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
337 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor

Could you share the code, so we can have a look in this?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

Tiffany_Hayden_
Collaborator
Collaborator

Here's the area of the code that's creating the dim. @bradeneuropeArthur 

 

 

                If Not oIntent1 Is Nothing And Not oIntent2 Is Nothing Then
                    Set oTextPt2D = ThisApplication.TransientGeometry.CreatePoint2d(oCLIn.StartPoint.X, oCLIn.StartPoint.Y + 3)
                    Set oDim = IsCompDimOnSheet(oDrawView, oIntent1, oIntent2)

                    If oDim Is Nothing Then
                    
                        If intCount > 1 Then
                            strPartialDimText = "(" & CStr(intCount) & ")" & " INT-" & strModelFirst(0) & " @ " & ReturnPropVal(oOccIntFirst.Definition.Document, "LENGTH") & " EACH"
                        Else
                            strPartialDimText = "*INT-" & strModel(0)
                        End If
                        
                        Set oDim = oSheet.DrawingDimensions.GeneralDimensions.AddLinear(oTextPt2D, oIntent2, oIntent1, kAlignedDimensionType, True)
                        Set oDimText = oDim.Text
                        oDimText.FormattedText = oDimText.FormattedText & vbCrLf & strPartialDimText
                        oDim.CenterText
                    End If

                    Call oDrawView.SetVisibility(oWPlInProxy, False)
                    Call oDrawView.SetVisibility(oWPlOutProxy, False)


                End If

 

 

Tiffany Hayden
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes