scotty7,
For the sake of argument, let's look at this from the start.
First, we install NX. Let's say we install it on D:\Program Files\UGS\NX 5.0\. The ugii_env.dat file that NX uses without any customizing is located in D:\Program Files\UGS\NX 5.0\UGII\. NX knows where this is located by default...you don't have to "tell" it that. Remember that, because it's important.....ugii_env.dat will only appear in ONE location and that is where it's installed. Don't do anything to that file, just leave it alone for now.
Now, we need to launch NX with a batch (.bat) file because we want to use the .bat file to define the location of our CUSTOM env.dat file using the "set UGII_ENV_FILE=[YOUR CUSTOM .DAT FILE NAME HERE].dat" variable. So, we make a new text file, put "set UGII_ENV_FILE=[YOUR CUSTOM .DAT FILE NAME HERE].dat" (no quotes) in it along with the call to launch NX and any other variables that need to be set at startup and then save the text file as a .bat file. You will now use this .bat file to launch NX, and not the default shortcut. When you double click on the .bat file, it will set all the variables you have listed in it (like where your custom env.dat file is located).
Once that is done, you create another text file that is going to be saved as your custom env.dat file. Include ONLY the variables from ugii_env.dat that you want to change. If necessary, open ugii_env.dat and copy/paste from it into your custom env.dat file. Also remember to put "#include ${UGII_ROOT_DIR}\ugii_env.dat" (minus quotes) at the end of the custom env.dat file or else NX won't know to use BOTH the ugii_env.dat file AND your custom env.dat file.
You can create 2 different .bat files, one for english and one for metric to get around that issue. If you're using NX3 or newer, you're NOT using either ug_english.def or ug_metric.def files. Those were replaced with the interactive Customer Defaults in NX3, which can be set during an NX session but take affect upon the next restart. These customer defaults are stored in a .dpv file, which can be customized (in your custom env.dat file) so that it can reside locally or on a network location for use by several users.
I hope all of that makes sense.
Tim Flater
Senior Designer
Enkei America, Inc.
Some people are like slinkies....they don't really have a purpose, but they still bring a smile to your face when you push them down the stairs.