Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All
The problem:
I have just written some iLogic code to automatically create an arc length dimension.
When I export my drawing to AutoCAD, the dimension is not formatted correctly.
The fix: In Inventor, edit the dimension and then close the dimension dialog box. I don’t have to do anything, just double click on the dimension and then click OK. Then it formats the dimension in AutoCAD correctly.
Is there something I can add to my code to do this automatically?
I will add a small section of code, which will prompt the user for a dimension value and place it on the drawing. This still presents the same problem when exporting to AutoCAD.
Please refer to the ScreenCast
Dim oDoc As DrawingDocument = ThisDrawing.Document Dim oSSet As SelectSet = oDoc.SelectSet oSym = "<StyleOverride Font='AIGDT' FontSize='0.25'>" & Chr(94) & "</StyleOverride>" Dim oValue As String="" If oSSet.Count = 0 Then MessageBox.Show("Select at least one dimension please", "iLogic", _ MessageBoxButtons.OK,MessageBoxIcon.Information) Else oValue = InputBox("Enter the Dimension Value", "iLogic", oValue) For Each obj As Object In oSSet Dim oDim As GeneralDimension=obj Dim oDimensionText As DimensionText = oDim.Text oDim.HideValue = True oDimensionText.LineSpacingType = (29185) ' this is the correct string to format the line for "Exact" oDimensiontext.HorizontalJustification = (19969) ' this is the correct string to format the line for "Center Justifictaion" oDimensionText.LineSpacing = ("0.25") ' This will set the dimension text to Exactly of 0.25\ oDimensionText.FormattedText = oSym & "<br/>" & oValue Next End If
Thanks
Regards
Reg
2026.1
2026.1
Solved! Go to Solution.