Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can i Override an environment variable in "ugii_env.dat"

Status
Not open for further replies.

JavadM

Mechanical
Apr 29, 2008
119
Hello friends
how can I input to correctly override an environment variable in "ugii_env.dat" file?

how it works?
thanks


NX 10
windows 10
 
Replies continue below

Recommended for you

Why do you need to override a value in that file?

Edit the ugii_env.dat file and save it so all users have the change.

Create in your start-in folder a ugnx_override.bat file.
In that file put your revised environment variable as line 1 and line 2 is your normal start NX command.
This way the environment variable will only be active for your sessions of NX.

You can also add an environment variable to your user profile, if IT allows that, to set it the way you want.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
thanks for response
I have to correct my question

previously I worked with solidworks for about ten years.
I'm not professional with NX. but I know environment variables are important in NX.
for example if I have to change mold wizard data base directory I have to set environment variable for that.

how is that?
"how is setting an environment variable" and where it have to be done?
is that in "advanced system settings" of windows?






 
NX is using a lot of environment variables.
This is good because you can set up the system in one place for many users. - No need to do it on every computer.
and if you add/change something on this central location , all the users will get the change at the next start of NX.

I normally recommend to set the variable UGII_ENV_FILE in windows. The UGII_ENV_FILE is a file where you can place all the variables you like/need for your installation.
it might be one variable , it might be very many variables. The "original" file, is the ( in the install directory) C:\siemens\NX10.0\ugii\ugii_env.dat . Its a simple textfile. It's empty .
Copy that file to some server which all NX users can reach, place it in a directory with a logical name such as F:\NX_config\.
there is another file in the UGII directory named "ugii_env_ug.dat". Do NOT modify this file nor move it. this file contains many ( but not all ) possible system variables.
Instead copy and change the variables found in this file to your copy of the ugii_env.dat Your copy will override the ugii_env_ug.dat IF you have set the UGII_ENV_FILE.
Clear ?
One of the good things with the concept above is that when it's time for NX12 etc, this file is ready for action, you will of course need to update all the other stuff....

How to set the variable in windows:
In Win 7 click the "start"button , in the menu that appears, the search field, type "system", then select the "Edit the system environment variables"
select the "environment variables" button, in then next menu, click "New..."
variable name UGII_ENV_FILE
Variable value F:\NX_config\ugii_env.dat
( per the example above)

You can also set ALL the NX variables in the windows system variables, but that requires a lot of work on all workstations. And, its prone to spelling errors.
If you wish , you can override a variable which is set in the ugii_env.dat in the windows system variables, but i do not think this is the case here.


Regards,
Tomas



 
 http://files.engineering.com/getfile.aspx?folder=6a3047f4-fa82-4df2-b03c-47601b50ee9c&file=systemvariable.png
You are really great Tomas
description was super clear and I learned much from it.

I tested your explanation and it works.


thanks a lot and best wishes for you
 
We have a different setup.
As described by Toost is of course a very good solution. However...setting the UGII_ENV_FILE in the system variable means you have to do this for each and every client where you are running NX... Also when the location of that file changes for some reason you need to change that on all clients

You can create a custom startup file where you set these variables (UGII_ENV_FILE, SPLM_License etc...)
Now it will be just a matter of copying this file to all clients (Can be done through a script) and they will always have the correct variables.
In our case (because we have a global environment) we have a share directory on the main server where we have all our start and environment scripts as well as all customization stored.

In the same directory we have a txt file (version.txt) where we note (history) all changes we make to the environment.
Our startup sequence file for NX compares this file to a copy stored on the local drive of the clients. When there is a difference between the Date Modified on the server and the client (which happens when we make changes in that file) it will copy the complete environment folder to the clients local drive.


Reason for this is that it would take too long for the clients to read the environment files and customizations from our main server each time they start NX...
And everybody will automatically get all the latest changes to their local client...

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2
HPZ420 Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz, 32 Gb Win7 64B
Nvidea Quadro4000 2048MB DDR5

HP Zbook15
Intel(R) Core(TM) i7-4800MQ
CPU @ 2.70 GHz Win7 64b
Nvidia K1100M 2048 MB DDR5

 
Hello Ronald
thanks for your notice and explanation.

I'm beginner in this aspect of using NX. previous CAD system was totally different.
with my respect for tomas about his detailed description, that works great for me, your setup also looks very good and less work needs for future changes.

but "if is possible" I want to learn more about doing that in practical way(Creating custom startup file). if you introduce any source or guide for study, you do big favor to me.


thanks again for sharing your method



 
Hi JavaDM,

The only documentation I have on NX System Administration is in German.
And through our disclosure agreement with Siemens I am not allowed to distribute them.

Look for NX system administration courses offered by Siemens or one of their partners.

But to get you started on the Startup cmd (or bat) file;

Code:
[i]rem Input Parameters:
rem
rem Command line parameters will be passed through to Unigraphics.  See
rem the UG Workstation Guide for information on supported parameters.
rem
rem NOTE: you MUST use a colon ':' to delimit a switch from its value.
rem 
rem       For example:
rem	  ugii -retrieve:block.prt
rem
rem ========================================================================= 
rem  
rem[/i]

[i]rem Setting base directories[/i]
[b]Set SCRIPTROOT=[/b] "path to where you will keep all your customizations and tools"
[b]set UGII_BASE_DIR=[/b] "Path to installation Directory of NX"
[b]set UGII_ROOT_DIR=%UGII_BASE_DIR%\ugii\[/b]
[i]rem Path where NX templates (UGMaster) are stored[/i]
[b]Set UGII_TEMPLATE_DIR=${UGII_Root_Dir}\templates[/b]

[i]rem pointing to License server for NX[/i]
[b]set SPLM_LICENSE_SERVER=28000@"your license server"[/b]
[i]rem setting environment file[/i]
[b]set UGII_ENV_FILE=%SCRIPTROOT%\ugii_env.dat[/b]
[i]rem Starting NX[/i]
[b]start %UGII_ROOT_DIR%ugraf.exe[/b]

So this will first set your base directories where you will keep your custom environment settings.
Next the License server is stated and the location of the ugii_env.dat file where you set the rest of your variables.

After that NX is started with the ugraf.exe file
These are the basic minimum options you need to be able to start NX with a customized startup command. I leave it up to you to figure out the rest of the variables you need.
In the ugii_env_ug.dat file (stored in your NX installation folder) you can find the instructions on which and how to set the other needed variables.

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2
HPZ420 Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz, 32 Gb Win7 64B
Nvidea Quadro4000 2048MB DDR5

HP Zbook15
Intel(R) Core(TM) i7-4800MQ
CPU @ 2.70 GHz Win7 64b
Nvidia K1100M 2048 MB DDR5

 
Hi Ronald
thanks for your instructions and guidance
that was very useful.


best regards
 
responding to an old thread...
Ronald,
I am not sure that i think it less work to install a specific bat-file on each computer instead of setting a system variable on each computer.

The Bat option has the negative side that you need to have a bat file for each Siemens -application you want to start.
One of my customers did have this solution , the motive was that the local workstation should not need to have any settings for NX, it should all be in the bat-file. ( -no, i don't know why.)
- The poor side of this was that they never realized the standalone translators, which at the time was both better(!) and faster than the NX integral. - We could not use these at all because the translator did not find the license...

It is though smart to have some form of sync built in to the start.
At the same company as described above we built a startup sync procedure similar to what you describe ( we used Windows Robocopy) , the local batfile only fetched the start-bat from the server. Which meant that we could change things over night. (These batfiles are kilobytes only and retrieve quickly)
The start-bat file ( again using robocopy) we could patch NX if we would like.

Regards,
Tomas
siemens-apps_bnsn47.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor