CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.096.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 13426:

Question

CAD 
 %  platform  category 
A
Using a trick with text formatting control codes, you can suppress the display of square brackets in AutoCAD (and LT) dimensions for alternative units, and then use them to display auxiliary data, such as relative (fractional) distances or the number of parts needed to compose the dimensioned distance (e.g., pipes, fence fields). The data is calculated dynamically, is associative with the dimensioned geometry, and does not require the use of text fields.

For example, computed dimensions may look like the following:

How to do this? First, we need to create a helper dimension style in the DIMSTYLE command, in which we make the necessary settings.

On the Primary Units tab, set the Suffix to "\F" or " mm\F". Why "\F"? That's one of the control codes for formatting text (see the Tip 8640) - it switches the font of the text, and effectively tells AutoCAD to "consider the following text as the font name" - thus "turning off" the automatically inserted "[" (until a semicolon or other control code is found).

The further required settings will depend on your desired "calculation" of the alternative dimension data. For example, if you want to display one-third of the measured dimension length, set the "Alternative units multiplier" to 0.333333 and then the desired Precision and Rounding. Set the desired prefix (the code "\X" means: wrap below the dimension line) and use "\F" again at the end of the suffix to turn off the automatically inserted closing square bracket ("]").

Or, if you want to calculate the estimated consumption of pieces of panels, pipes, fence posts, etc. per dimensioned length, use a calculation with a factor that determines the relationship between the length of the geometry and the length of the part - for example, for 40mm parts, the multiplier would be 0.025 (1/40). Again, set the Precision and Rounding - in this case, probably "0" and "1". You can also use other control characters in the Prefix and Suffix fields, e.g. "\H" for text height or "\L" for underline.



For example, the resulting behavior of a dimension with this dimension style is as follows:


Note: due to the "fake" font switch, the "alternate" part of the quote may appear in a different font in some cases - for these situations, change the settings of the FONTALT variable.

ACADACLTADTACADMPlantMapCivil3D
100% *CAD
28.7.2022    49577×  

See also:
Tip 14615:How to create negative dimensions in AutoCAD?
Tip 14608:How can the same DWG show dimensions for the Germans and French with a decimal comma, and for the British and Americans with a point?
Tip 14606:How to display imperial dimensions including zero inches?
Tip 14527:Search/Replace texts in Inventor drawings - iLogic.
Tip 14454:How to hide dimensions with zero- or small length?


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Link your AutoCAD block attributes with Excel tables/sheets. Automatically. Dynamically. Bidirectionally.
Try Excellink 2015 More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist