Tuesday, June 11, 2013

Text Style Change with Macro

I know that one thing some people have problems with is when you xref or insert a title block into a drawing file; the text style changes back to the original font type.  This was happening with the title block that our company is standardizing.  So, I came up with a quick fix for our design group to take the standard text style and change the font type to the proper font so that the text would look the way it was meant to.

Here is the macro:
-STYLE;STANDARD;Arial Unicode MS;.125;;;;;

So, first in this code is obviously the command; which in this case is our text style command.  Then you will list the text style that you are wanting to change; next will be the font style that you are wanting to change it to, and then finally the height of the text.  Last there are a bunch of semi-colons attached to the end of the code to enter through other questions that comes with changing the text style, but none of them applied in this case.

Below is an example of this being used in one of my titleblock macros for inserting a title block and creating new layers for discipline specific drawings:

^C^C-STYLE;STANDARD;Arial Unicode MS;.125;;;;;ATTDIA;0;layout;set;layout1;
^C^C-insert;D-SIZE_BOTTOM(22X34)(REV_D);0,0;XYZ;1;1;1;0;;;;;;^C^C-INSERT;*REV-TEXT.DWG;0,0;1;0;^c^cpsetupin;"D_SIZE-PID.DWG" "*";

^c^c-plot;n;layout1;11x17;;n;y;n;
-LAYER;NEW;D_EQ;LTYPE;CONTINUOUS;D_EQ;LWEIGHT;.020;D_EQ;COLOR;11;D_EQ;;
-LAYER;NEW;D_PR;LTYPE;CONTINUOUS;D_PR;LWEIGHT;.030;D_PR;COLOR;14;D_PR;;
-LAYER;NEW;D_UT;LTYPE;CONTINUOUS;D_UT;LWEIGHT;.015;D_UT;COLOR;9;D_UT;;
-LAYER;NEW;D_FIT;LTYPE;CONTINUOUS;D_FIT;LWEIGHT;.015;D_FIT;COLOR;7;D_FIT;;
-LAYER;NEW;D_INST;LTYPE;CONTINUOUS;D_INST;LWEIGHT;.010;D_INST;COLOR;4;D_INST;;
-LAYER;NEW;D_FUT;LTYPE;PHANTOM;D_FUT;LWEIGHT;.010;D_FUT;COLOR;6;D_FUT;;
-LAYER;NEW;D_EXIST;LTYPE;DASHED;D_EXIST;LWEIGHT;.010;D_EXIST;COLOR;5;D_EXIST;;
-LAYER;NEW;D_TXT;LTYPE;CONTINUOUS;D_TXT;LWEIGHT;.015;D_TXT;COLOR;7;D_TXT;;

-LAYER;NEW;VIEWPORT;COLOR;211;VIEWPORT;PLOT;NO;VIEWPORT;;
^C^C_EATTEDIT;7.153207,1.737254,0.000000;^C^C-LA;SET;VIEWPORT;;^c^c-vports;1,21.4999;27.5,2;^C^C-LA;SET;D_PR;;^C^C_.INSERT;LOGO-CALLOUT;18.25,1.375,0;XYZ;1;1;1;0;

No comments:

Post a Comment