I'm using the iLogic snippets to create linear dimensions without issue, but I would like to know if it's possible to add some text during the creation. For example, I would like to add "TYP" after the dimension value.
Below is the code that creates one of the dimensions.
'Front View Dimensions Dim VIEW45 = UPPER_SM_PAN_18.DrawingViews.ItemByName("VIEW45") Dim Edge5 = VIEW45.GetIntent("Edge5") Dim Edge6 = VIEW45.GetIntent("Edge6") Dim linDim7 = genDims.AddLinear("Dimension 7", VIEW45.SheetPoint(0, 1.1), Edge5, Edge6)
Solved! Go to Solution.
Solved by Michael.Navara. Go to Solution.
You need to modify the FormattedText of the dimension. See XML Tags for FormattedText for more information.
This is the line of code which appends "TYP" after the dimension text
Dim linDim7 = genDims.AddLinear("Dimension 7", VIEW45.SheetPoint(0, 1.1), Edge5, Edge6)
linDim7.NativeEntity.Text.FormattedText = "<DimensionValue/> TYP"
Hi Michael,
Your solution worked perfectly. Thank you for the URL for the XML tags.
Can't find what you're looking for? Ask the community or share your knowledge.