About Stacked Text Formatting:
- AutoCAD Stacked Text formatting can be used inside Civil 3D (C3D) labels.
- Superscript and Subscript formatting are stacked text.
- Tolerance formatting can be helpful.
- Stacked formatting has a decimal-aligned style.
Civil 3D labels are very useful. Customized Label Styles expand that usefulness.
It is not readily apparent, but a cockeyed point of view lets one make good use of stacked text formatting in Civil 3D labels.
Contents
- Not Just for Fractions: Codes and Caveats
- Superscripts and Subscripts
- Tolerance Style
- Decimal Style
- Fractions
- C3D: What Can I Stack in a Label?
- Examples
- Summary
- Call to Action
- Series Roadmap
1. Not Just for Fractions: Codes and Caveats
Any sufficiently advanced technology is indistinguishable from magic.
Clark's Third law, Arthur C. Clarke
Out-of-the-box, AutoCAD does a pretty good job at recognizing fractions and tolerances and automatically applying the correct stacked text format. It is almost magical. This automatic stacking only recognizes numbers. This covers the most obvious and arguably most essential uses of stacked text formatting.
The basics are covered at this link: To Work With Stacked Text
You may also see lesser-known uses if you tilt your head just right and squint.
The remainder of this post is based on manually applied stacked formatting.
MTEXTAUTOSTACK controls auto stacking. On for enabled, or Off for disabled.
Enter the text you want to stack separated by one of the following characters (Codes):
- Forward slash (/) stacks text vertically, separated by a horizontal line.
Text is Left Aligned. - Pound sign (#) stacks text diagonally, separated by a diagonal line.
- Caret (^) creates a tolerance stack, which is not separated by a line.
Text is Left Aligned. - Tilde (~) creates a decimal-aligned tolerance stack, which is not separated by a line.
Numbers are Decimal Aligned. The text is Left Aligned. (See caveats below.)
Caveats:
- Decimal-aligned tolerance style is the red-headed stepchild of stacked text formatting.
- It does not auto-apply.
- When first manually applied, the decimal-aligned style is displayed as left justified.
You need to select, then manually set the style to something else, then reselect, then manually set the style back to decimal.
Voila, now decimal aligned! Not very magical ... well, maybe dark magic. - There is little AutoCAD documentation on the decimal-aligned tolerance style.
Perhaps that is understandable. - Tip: Initially, use the caret code (^) and create a tolerance stack.
Then use stack properties to assign the Decimal style. - It is not available to C3D labels, but it would be nice.
- Stacked Text height can be set from 25% to 125%, with a default of 70%.
Tip: 25% and 125% need to be manually entered. They are omitted from the drop-down list.
2. Superscripts and Subscripts
I will start here because these are the most applicable to Civil 3D labels in my option.
You are entitled to hold a different opinion.
For the MTEXT Editor
It is not readily apparent, but superscripts and subscripts are special cases of stacked text tolerance style.
This can be demonstrated using the MTEXT editor:
- Select the text to be superscripted, then click the Superscript button on the ribbon, or right-click and select Stack.
- With the superscripted text selected, right-click and select Stack properties.
The Stack Properties show this uses a tolerance style with no Text Lower content.
You can experiment with Position and Text size. Click OK or Cancel to exit. - Observe that the ribbon indicates that the selection is both a subscript and stacked text.
Click on the stacked text button to unstack the text.
The unstacked text is 2^.
Tip: Recognizing this code is the key to using superscripts in a C3D label.
For Civil 3D Labels
As seen, superscript is on the ribbon when using the MTEXT editor.
The process is not as evident in the Label Style Composer (LSC) and the Text Component Editor (TCE).
It is reasonable that LSC and TCE, as tool-making tools are not as polished as the MTEXT editor, a production tool.
Here is how to add a superscript to a C3D Label:
- Type your subscript code into the TCE. In this example, we want to create A². The Code is 2^.
- With the superscript code, 2^, selected, right-click and select Stack.
- Alternately, with the superscript code, 2^, selected, click the stack icon at the bottom of the Format tab.
- The TCE contents should now include A².
- Select A², right-click and Click on Properties. The Stack Properties will open.
Text Upper is "2", Text Lower is blank, and Style is Tolerance.
I suggest setting Position to Bottom. You can adjust the text size as you wish. - The text in these screen captures may be challenging to read. Here is a blowup.
Creating subscripts is similar. For Q100, the text would be Q^100, and ^100 would be selected and stacked.
3. Tolerance Style
The Caret (^) code creates a tolerance stack, which is not separated by a line. The text is Left Justified.
The text size control can be put to good use.
- For the MTEXT editor, select the text to be stacked, then click the Stack button on the ribbon or right-click and select Stack.
- For Civil 3D Labels, while in the TCE, select the text to be stacked, right-click and select Stack, or click the stack icon at the bottom of the Format tab.
4. Decimal Style
The Tilde (~) code kinda, sorta, maybe, creates a decimal-aligned stack that is not separated by a line.
The text is Decimal aligned. The text size control can be put to good use.
- For the MTEXT editor, select the text to be stacked, then click the Stack button on the ribbon or right-click and select Stack. In actuality, the text will probably be left aligned. You will need correct this manually.
Tip: Initially, use the caret code (^) and create a tolerance stack.
Then use stack properties to assign the Decimal style. - Decimal-aligned Style is not available for Civil 3D Labels.
5. Fractions
The Forward Slash (/) stacks text vertically, separated by a horizontal line. The text is Left Aligned.
The Pound Sign (#) stacks text diagonally, separated by a diagonal line.
- For the MTEXT editor, select the text to be stacked, then click the Stack button on the ribbon or right-click and select Stack.
- For Civil 3D Labels, while in the TCE, select the text to be stacked, right-click and select Stack, or click the stack icon at the bottom of the Format tab.
Because Fractions are stacked text, there is additional text size control in C3D labels. Vertically stacked fractions provide a dividing line. I have found no exciting use for Diagonally stacked fractions in C3D labels.
6. C3D: What can I Stack in a Label?
Stacked text can include Standard Text, Object Properties, and Expressions.
Stacked text cannot include already stacked text. That would violate the prime directive or some such nonsense.
A single text component Note Label sample follows. The information available to the text component includes Note Properties and Note Expression as shown:
When sent to the TCE, these properties and expressions have added user-issued formatting codes.
Here is the TCE text string (single line) for the sample:
"<[I'm an Expression!(P0|RN|AP|GC|UN|Sn|OF)]>, <[I'm an Expression to!(P0|RN|AP|GC|UN|Sn|OF)]>"^ N: <[Northing(Uft|P2|RN|AP|GC|UN|Sn|OF)]>/E: <[Easting(Uft|P2|RN|AP|GC|UN|Sn|OF)]>
Here is a pretty interesting note Label that uses only one text component.
- The first stack included both expressions and sets the text size at 125%. It is a Tolerance (^) stack with no lower text. The stack is used only for text size control.
- The second stack includes the northing and easting properties. The Vertical Fraction (?) stack inserts a dividing line and allows 100% text size. The line can be eliminated by using a Tolerance (^) stack.
- Because this label uses only one text component:
- A single Border and Background mask encompasses the entire label. No extra lines and line logic.
- There are no anchor/attachment concerns.
- Dragged mode stacked text maintains the as-composed configuration. I think this is a good thing. Stacked and As-Composed styles may still be desirable.
YES! There is a typo. "I'm an Expression to!" should be I'm an Expression too!" Welcome to the wonderful world of non-editable expression names. I was not worth the effort required to correct it.
7. Examples
Now for the interesting part. This will be mostly "Show" and only a little "Tell."
I will attach a drawing file with the MTEXT examples that can be explored further.
A drawing file with labels may follow later.
All of the following in the attached file.
8. Summary
I hope you found this post helpful, enlightening, or at least interesting.
Stacked text is not just for fractions. If you can do it in the MTEXT editor, you can probably do it in the Label Style Composer Text Component Editor. You can use the tolerance option to good effect in civil 3D labels.
9. Call to Action
Please comment and submit your uses and examples. They can help others.
I have a related ideas posted in the Civil 3D Ideas forum: Fix Decimal Aligned Stacked Text
Please click the link to visit, review and possibly vote!
(You do not have to be a Civil 3D user to visit and vote.)
10. Series Roadmap
The Series So Far ...
Leveraging Label Legerdemain!
... Not Magic, but a Quest for Some Pretty Good Label Tricks
... "I Can See Clearly Now ..." Better visibility for Text Component Editor Contents window
This Post ...
... When The Chips are Stacked Against You, Finesse the Stacked Formatting (General)
What's Next? (Subject to change)
... An Expression is An Expression is an Expression NOT!
.... "Let's Start at the Very Beginning ..." A Minimal Template and Finally a Label!
... Divide and Conquer: Fancy Numeric Formatting
... Ah, Yes, The Old Display Conditionally By Text Height Trick
... Ah, Yes, The Old Display Conditionally By Hide Negative Value Trick
... To Text Height or to Hide Negative Value. That is the Question
... About That Elephant in the Room: Truncation that works
...
...
...
Attachments: Updated 2022-11-04
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.