×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

environmental variable and customization problems

environmental variable and customization problems

environmental variable and customization problems

(OP)
Hello, I'm having a go at setting environmental variables and start up scripts to set the templates on a server.

So I created a templates folder on the server, created the templates and changed the .pax files to suit.

Then I copy pasted the ugii_env.dat file to the server and added this line:
UGII_TEMPLATE_DIR= path to the templates folder

Then created a small script to launch NX that I will give to everyone using NX:

@echo off
set UGII_ENV_FILE=path to the ugii_env.dat on the server
start "" "C:\Program Files\Siemens\NX 9.0\UGII\ugraf.exe"

Now my question is, If anyone for some reason doesn't have access to the server because they are off site or working offline they can't access any of this things.
Can I write an IF statement on the launch script that if the ugii_env.dat is not found to use the standard NX setting in the root directory?
How do I do this?

Is there also a environmental variable to change the welcome screen to a different one?
I found this one: UGII_BACKGROUND_URL, but if the welcome help page is turned off it will not work
is there an environmental variable to turn that help welcome screen back on again?

Thanks so much
best regards

Francisco

RE: environmental variable and customization problems

Check if the file on the server is there before you set the ENV:

if EXIST "blah" (
set ...
) ELSE (
set ...
)

Mark Rief
NX CAM Customer Success
Siemens PLM Software

RE: environmental variable and customization problems

Franscico,

Another approach that may be more robust is to set UGII_ENV_FILE to a local file that performs the test of the networked file and if the network location is available uses the contents of the network file.

This insures that the variables will be used for NX from the shortcut and by all NX command line utilities and NX sessions launched by means other than the batch file/shortcut (e.g. windows explorer double click, etc.).

It gives the opportunity to have some variables set even if the network share is unavailable.

The local UGII_ENV_FILE would look something like this. (NX 9 implicitly processes the $UGII_BASE_DIR\ugii\ugii_env.dat file after the UGII_ENV_FILE (but there is no harm in explicitly adding that to the end of the local file to help depict the logic for the order of the files used))))

CODE -->

#if FILE server\share\file.ext
#include server\share\file.ext
#endif

## Other env vars if needed ...

#include ${UGII_BASE_DIR}\ugii\ugii_env.dat 

HTH,

Joe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources