Message 2 of 8
Re: iLogic to add symbols to dimension text in drawings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there
The characters are in the AIGDT font set. I used MS Word to get the character codes, and as an example I used M (Maximum material condition)
See if this works for you.
Sub main()
Dim oDoc As DrawingDocument = ThisDrawing.Document
Dim oSSet As SelectSet = oDoc.SelectSet
If oSSet.Count = 0 Then
oDimSelect = ThisApplication.CommandManager.Pick(kDrawingDimensionFilter, "Select a dimension")
'MessageBox.Show("Select at least one dimension please", "Dimension to modify", MessageBoxButtons.OK, MessageBoxIcon.Information)
oSSet.Select(oDimSelect)
Call oDim(oSSet)
Else
Call oDim(oSSet)
End If
End Sub
Sub oDim(ByRef oSSet)
oSym = "<StyleOverride Font='AIGDT' FontSize='0.25'>" & Chr(109) & "</StyleOverride>"
For Each obj As Object In oSSet
Dim oDim As GeneralDimension = obj
Dim oDimensionText As DimensionText = oDim.Text
oDimensionText.HorizontalJustification = (19969) ' this is the correct string to format the line for "Center Justifictaion"
oDimensionText.FormattedText = (oSym)
Next
End Sub
Reg
2026.1
2026.1