Wednesday, November 21, 2012

Diesel Sequential Numbering...Adding prefix to numbering

So, this is a continuation to the last post of the diesel automated numbering.
In this one, I am going to show you how to make it to where you can enter in an environment variable to create a prefix that will show at the beginning of your numbering.
Below is the Macro coding for what we are going to work with:


*^c^c_text;\;$M=$(getenv,StrPrefix)$M=$(+,$(getvar,USERR1),$(getvar,USERR2));setvar;USERR1;
$M=$(+,$(getvar,USERR1),$(getvar,USERR2));

Now, what is being added to the macro is the following; $M=$(getenv,StrPrefix)
this coding is pulling the value that a user sets for the StrPrefix.

To establish this environment value follow the steps below:
1. on the command line; type in  _setenv (then hit enter)
2. type in StrPrefix (then hit enter)
3. enter in the text variable that you are wanting to use for your prefix (then hit enter)

Now, with your user variables already set you can run the new command and you will have the established prefix showing up in your text.


No comments:

Post a Comment