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?
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.
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 !
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.
Can't find what you're looking for? Ask the community or share your knowledge.