Solved

Assigning separate colours to grouped multiline text in AutoCAD


Badge

I can group separate features together for labelling purposes and this is what the attribute looks like as an autocad_mtext_string

 imageHowever, I can only assign one colour by using this approach.

How can I assign separate colours to lines of text within a grouped mtext string so it looks like this?

image.png 

icon

Best answer by caracadrian 2 March 2023, 07:58

View original

2 replies

Badge +20

Autocad sets color in mtext via \Ccolor_number in strings and font via \fFONT_NAME.

Using this in LabelPointReplacer:

\C3;How now green cow
\C7;How now black cow
\C5;How now blue cow

gives this result:

dwg multi_color_mtextThis string in LabelPointReplacer:

\fISOCPEUR|b0|i0;\C3;How now green cow
\C7;How now black cow
\C5;How now blue cow

gives this result:

dwg multi_color_mtext ISOCPEURI also attached a sample workspace. 

Badge

Autocad sets color in mtext via \Ccolor_number in strings and font via \fFONT_NAME.

Using this in LabelPointReplacer:

\C3;How now green cow
\C7;How now black cow
\C5;How now blue cow

gives this result:

dwg multi_color_mtextThis string in LabelPointReplacer:

\fISOCPEUR|b0|i0;\C3;How now green cow
\C7;How now black cow
\C5;How now blue cow

gives this result:

dwg multi_color_mtext ISOCPEURI also attached a sample workspace. 

You've solved my problem. Thank  you!

Reply