Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dimensions having gaps in dimension line

2 REPLIES 2
Reply
Message 1 of 3
Tiffany_Hayden_
204 Views, 2 Replies

Dimensions having gaps in dimension line

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

Tags (1)
2 REPLIES 2
Message 2 of 3

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

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 3 of 3

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report