AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

two fonts and two font sizes in label

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
annw2
1463 Views, 3 Replies

two fonts and two font sizes in label

Again as I stumble through this process, I am starting to figure out how to label the tax parcels with owner name, Tax ID codes, etc.

 

Our standard is to have the "N/F name" in a larger font & the remaining information in a different font and smaller size.

 

As far as I can see, I need to use the concat function for one long chain and I can't see any provisions for changing font half way through or adding a second concat function at a different size.

 

The help function leaves a lot to be desired.

 

Now that I have it working, how do I put this function into my template or block it from one drawing to another?

Ann Wingert, P.E.
3 REPLIES 3
Message 2 of 4
diane.cloutier
in reply to: annw2

Hi Ann,

 

As far as I can tell, there is no way to use more than one font type/size in a label.  I am going to research this a little further though to confirm this or see if there is some sort of workaround.  

 

You also wanted to know how to apply label settings to other drawings.  You can accomplish this by saving a layer file (the resulting file will have the extension .layer) and then loading the layer into a new drawing.  

 

To save a layer:

1) In the Display Manager, right-click the layer > Save Layer

 

To load a layer:

1) In the Display Manager, click Data > Load Layer

 

If you just want to save the label expression for future use, you can Save/Load Expressions via the Options button on the Create/Modify Expressions diaglogue box.

 

SaveLoadExpressions.png

 

Please let me know if that helps.

 

Thanks,



Diane Cloutier
Message 3 of 4

Hi Ann,

 

Thank you for your patience while I researched your question about using two different font styles/sizes in a GIS polygon label. It turns out that you can do this with an MTEXT label and format codes. This method is pretty straight forward if you are using static text, but if you are using an expression (as you likely would be with parcel labels), there is a known issue with the '|' character (the style editor wraps the expression string in double quotes and causes incorrect evaluation of the expression) but there is a workaround.  Here are instructions/examples for both static text and the expression workaround:

 

Static Text:

 

1)When you add the feature label, make sure you choose the MTEXT symbol:

MtextLabel.png

 

2) Then in your label text content add the control code you need.

 

Here are some examples:

 

Example 1 – two fonts

“\fArial|b0|i0;Arial\P\fTimes New Roman|i1|b1;Times New Roman”

Ex1.png

 

Example 2 – fonts / colors, underline / overline

“Black \C3;Green \P\C0;\fTimes New Roman|i1|b1; Times New Roman Italics Bold \P\fArial|i0|b0;\LUnderlined\l \OOverlined\o”

Ex2.png

 

 

Expression Workaround:  


1) Create a layer with the label and give it the desired expression.  At this point it won’t yet render correctly because it has the extra quotes.  You can actually see this in the style editor:

Expression.png

 

2) Save the layer as a .layer file

 

3) Open the layer file in a text editor, and search for the expression. It should be part of a ParameterValue element. In my case I had the following:

<ParameterValue>"CONCAT('\fArial|b0|i0;Area: ', AREANAME, '\P\fTimes New Roman|i1|b1;State: ', ST)"</ParameterValue>

 

4) Remove the extra quotes surrounding the expression, and save the .layer file

<ParameterValue>CONCAT('\fArial|b0|i0;Area: ', AREANAME, '\P\fTimes New Roman|i1|b1;State: ', ST)</ParameterValue>

 

5) Drop the modified layer into Map’s Display Manager – the labels now display correctly:

ExpressionSample.png

 

Note – as soon as you use Map’s Style Editor to make a change to the label it will once again add the extra quotes.

 

This issue with the '|' character has been logged with our development team as a change request.

 

Also, here are some links to format code references:

 

http://docs.autodesk.com/ACD/2014/ENU/index.html?url=files/GUID-7D8BB40F-5C4E-4AE5-BD75-9ED7112E5967...

 

http://www.cadforum.cz/cadforum_en/text-formatting-codes-in-mtext-objects-tip8640

 

Hope that helps.

 

Thanks!

Diane



Diane Cloutier
Message 4 of 4

One more thing to add...

 

The reference links I included are both missing the format codes for font (lower case 'f') and true color (lower case 'c'):

 

\ffont[|b#][|i#][|p#][|cN]; TrueType font override.

Example: \fArial|b0|i0|p34|c0;

  font: TrueType face name

  b#, where # is 0 or 1 for bold off/on; optional

  i#, where # is 0 or 1 for italic off/on; optional

  p#, where # is Windows LOGFONT Pitch and Family parameter; optional

  c#, where # is Windows LOGFONT character set parameter; optional

 

\c#; - True color in decimal, where # is 0 to 16777215 Decimal BGR color (Blue << 16) | (Green << 😎 | (Red);

Example: \c16744192;

 

I have also logged a request to update this in the Help file (as well as those from the CADforum site that are missing).

 

Thanks,



Diane Cloutier

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost