start

PKGTH

PKGTH is a macro command for Get Text Height. When you call the command in a macro, it gets the value of the current text height displayed in the top status bar and saves it as a variable. The syntax for including it in a macro line is to call the command and define it to a variable:

PKGTH;VariableName

In the example below, PKGTH is used in a Menu Macro series that inserts geometric tolerancing objects. The objects are drawn with a text height of 1.00 unit and stored in a sub-directory from which they can be inserted. To match the text height on the current drawing, the menu macro uses PKGTH to read the current text height into a variable called “Tx_Height.” Once the Insert Part command is called (PKPARTM) the scaling factor is applied by that text height variable, with a rotation of zero.

Draft:
Datums	              >:
 Datum Box Horizontal  :~|PKGTH;Tx_height;PKPARTM;#DRAFT\DATUMBOX(HORZ);Tx_height;0;
 Datum Box Vertical    :~|PKGTH;Tx_height;PKPARTM;#DRAFT\DATUMBOX(VERT);Tx_height;0;
 Target X              :~|PKGTH;Tx_height;PKPARTM;#DRAFT\TARGETX;Tx_height;0;
Tolerance Block       >:
 Angularity            :~|PKGTH;Tx_height;PKPARTM;#DRAFT\ANGULAR;Tx_height;0;
 Concentricity         :~|PKGTH;Tx_height;PKPARTM;#DRAFT\CONCENT;Tx_height;0;
 Cylindricity          :~|PKGTH;Tx_height;PKPARTM;#DRAFT\CYLIND;Tx_height;0;
 Flatness              :~|PKGTH;Tx_height;PKPARTM;#DRAFT\FLAT;Tx_height;0;
 Linear Profile        :~|PKGTH;Tx_height;PKPARTM;#DRAFT\LPROFILE;Tx_height;0;
 Parallel              :~|PKGTH;Tx_height;PKPARTM;#DRAFT\PARALLEL;Tx_height;0;
 True Position         :~|PKGTH;Tx_height;PKPARTM;#DRAFT\POSITION;Tx_height;0;
 Perpendicularity      :~|PKGTH;Tx_height;PKPARTM;#DRAFT\PERPEND;Tx_height;0;
 Roundness             :~|PKGTH;Tx_height;PKPARTM;#DRAFT\ROUND;Tx_height;0;
 Runout                :~|PKGTH;Tx_height;PKPARTM;#DRAFT\RUNOUT;Tx_height;0;
 Surface Profile       :~|PKGTH;Tx_height;PKPARTM;#DRAFT\SPROFILE;Tx_height;0;
 Straightness          :~|PKGTH;Tx_height;PKPARTM;#DRAFT\STRAIGHT;Tx_height;0;
 Total Runout          :~|PKGTH;Tx_height;PKPARTM;#DRAFT\TOTRNOUT;Tx_height;0;

Below are Inserted Parts corresponding to the menu macro examples listed above. The text height in the part file started out as 1.00 units, but upon insertion scaled down to .1875 units, to match the text height being used in the current drawing.