×
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

Coustomising ugii_env.dat
3

Coustomising ugii_env.dat

Coustomising ugii_env.dat

(OP)
I guess quite a lot of businesses customise their UG installation through the ugii_env.dat file.  What is perceived as best practice for this (having just waded through converting an NX4 version to incorporate all the changes we put in at NX2).
1.  Put the changes in the file next to the vanilla variable
2.Put the changes all together at the top or bottom of the file
3. Put the variables in a separate file and call this from ugii_env to overwrite settings made in the otherwise untouched UGS-supplied file.
4.  Something else I haven't thought of!
Opinions gladly received!

RE: Coustomising ugii_env.dat

I would make a separate .dat file, saved in a directory structure with any other NX customizations, and call it up via a batch file that launches NX and includes the following line (minus the brackets):

set UGII_ENV_FILE=[YOUR CUSTOM .DAT FILE NAME HERE].dat

This won't do anything other than add your customizations to those already found in ugii_env.dat.

I would make sure both the batch file AND custom .dat file had a revision record at the beginning and anyone who revises the files must date and initial each change in the revision record at the top of the files.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

I used to modify the file by commenting out the defaults and adding my modified lines below the original lines.

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

Ben Loosli

RE: Coustomising ugii_env.dat

Since I run several versions of UG/NX on my system (currently this numbers 9 versions, from UG V16.0.4.2 thru NX 6.0.0.12), I use individual .bat files to launch each version.  In these .bat files, I set the various Environment Variables (which will overide any variables set in the ugii_env.dat file or in my system's profile) that I use to control and customize these sessions.

John R. Baker, P.E.
Product 'Evangelist'
NX Product Line
SIEMENS PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

RE: Coustomising ugii_env.dat

I have 4 versions of NX running and also use John's approach of using BAT files. Never touch the ugii_env.dat file.

Specialty Engineered Automation (SEA)
http://www.sea4ug.com
a UGS Foundation Partner

RE: Coustomising ugii_env.dat

Ok.... this thread is begging me to ask the question(s):
1)How does the batch file work?
2)Got a handy batch file I could look at? (I'm currently in the midst of trying to customize my site from an 'out of the box install' into something better suited for our needs...)
3)The approach I was going to take would be to put the customized env.dat file on the server (site dir) for each individual to load on launch.  Pros/Cons of this approach?

Of course, all suggetions encouraged and welcomed.  :P

Regards,
SS
CAD should pay for itself, shouldn't it?

RE: Coustomising ugii_env.dat

John, I think you need to install version 9 just to make it a even number of installations.

Justin Ackley
Designer

RE: Coustomising ugii_env.dat

John,

You state that you still have UG v16.0.4.2?

Is there still a big call for v16, or are you really sentimental?

Chris Cooper
Senior CAD Specialist
Cleveland Golf / Never Compromise
www.clevelandgolf.com
www.nevercompromise.com

RE: Coustomising ugii_env.dat

SS,

Check my profile and send me an email and I will send you my batch file if you'd like to take a look at it.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

Tim,

I attempted to send you a request for that batch file, but it didn't get through and is in "quarantine".  Could you send me a copy?  Check profile.  Thanks!

Eric

RE: Coustomising ugii_env.dat

Note that I still have stored on my system some customer files that were last saved in V9.0 (in May 1993 to be exact) just so that when someone in the crowd asks "how far back can we go" in terms of supporting legacy part files, I just go and open one of these files DIRECTLY with no conversion or pre-processing and also without having to first open them in any of the previous versions and then saving them.  In fact, I just tired this using the lastest development phase of NX 6.0 and they came up with no problems and everything still looks as good as it ever did.

As for keeping UG V16.0 on my system, it's partly because I can't go back any further winky smile

You see, V16.0 was the first version that was 100% Windows native without any need to emulate anything.

As for the real reason, occasionally we get into some debates (both with customers and sometimes with ourselves) about how long has something worked a certain way or when did we stop doing this or start doing that, etc.  And there's nothing like seeing live in front of you to settle arguments like that.  Besides, it's just gratifying sometimes to think that these old versions continue to run on the latest update of Windows and they have not been certified in years.

So perhaps I do keep it around, at least partially, for sentimental reasons winky smile

John R. Baker, P.E.
Product 'Evangelist'
NX Product Line
SIEMENS PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

RE: Coustomising ugii_env.dat

ewh,

I got your email.  Did you get mine or was mine the one in quarantine?

Late night tonight and won't be in office again until Monday, if all goes as planned.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

Tim,

It was quarantined on my end.  Our IT guy is out for several days, so it looks like it is stuck there.  Thanks for trying!
Maybe you could change the file extension to .txt and I could change it back once it gets through.

Eric

RE: Coustomising ugii_env.dat

John,

I do remember the v16 switch from Unix to Windows boxes, now that you mention it.

As for the ability to settle arguments, I had never thought of that, but I have witnessed many discussions where someone would be sure that it used to work THIS WAY, way back when and you would come back with, no - it worked THAT WAY and here is the proof!

Now, I know that you are sentimental and I can give you three examples:

1) First and foremost, I have been fortunate enough to have attended a number of your 'What's New in NX' rollout sessions, and I have seen the ever-updated first slide in your presentations.

2) At a couple of these sessions, I have also had the pleasure of viewing the old marketing movies from 1977/1978.

3) Finally, if memory serves, you have framed in your office, more than 2 decades worth of the business cards that you have accumulated (now to be updated with one from Siemens).

Chris Cooper
Senior CAD Specialist
Cleveland Golf / Never Compromise
www.clevelandgolf.com
www.nevercompromise.com

RE: Coustomising ugii_env.dat

Chris,

Actually, UG has run on Windows since V11.1, but until V16.0, it required a motif emulator for the UI and graphics since while the basic code was being executed in native Windows, the UI was still using the original motif style developed for UNIX.

As for my presentation, I just updated the picture on my 'product update' slide with one from this past August winky smile

As for the business cards, yes, I'm up to 24 and so far Siemens accounts for TWO of them since we've already had our second name change since the buyout (check out my signature and note that the 'UGS' has been officially dropped).  We are now 'Siemens PLM Software Inc.'.  Or when we need to be formal (and legal), as on the latest version of our business cards, 'Siemens Product Lifecycle Management Software Inc.'.  The use of 'UGS' will now be limited to just our 'UGS Velocity Series' line of products for the mid-range markets.

Ah, the passing of another era winky smile

John R. Baker, P.E.
Product 'Evangelist'
NX Product Line
SIEMENS PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

RE: Coustomising ugii_env.dat

So SPLMS or SPLMSI would be an OK acronym in place of UGS?

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

> set UGII_ENV_FILE=[YOUR CUSTOM .DAT FILE NAME HERE].dat

Quick question on this, do we simply copy the UGII_ENV file and modify it or do we just put our changes to it and it simply goes:

our custom dat > ug default dat

Where when a variable or path isn't set in the custom one it then looks in the default dat for the information.

Correct me if I am wrong but the maintenance releases and maintenance packs typically overwrite the defaults and would destroy any changes / modifications etc?

Thanks,

Brian

RE: Coustomising ugii_env.dat

Brian,

You would make a batch file that calls YOUR custom env.dat file (along with the call to launch NX).  You can either copy the default NX ugii_env.dat file or make your own with Notepad or any text editor and save it as a .dat file.  If it were me, I'd just copy the variables that I wanted to change in ugii_env.dat and paste them into custom.dat.

Using the above method will avoid anything being overwritten during MR or MP installations.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

Hello Tim,

  I have it set to use a different ugii_env.dat file from another location.  I operated under the assumption that it would read the defaults from the UGII directory, and then anything that was specified differently would be overridden by the custom DAT file.  

Correct me if I am wrong but if I set UGII_ENV_FILE= to something other than the default location it cannot just have the changes but rather the whole file in a modified state.  

If someone wants to chime in on this otherwise...

Thanks,

Brian

RE: Coustomising ugii_env.dat

Brian,

I believe NX will use both the ugii_env.dat file and the custom env.dat file if you only define the custom env.dat file location (set UGII_ENV_FILE).

My custom env.dat file only defines a few variables, so it must be getting the rest from the default file, ugii_env.dat.

So your assumption was correct according to how it's running on my end.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

I am currently setting up NX5 for our site. I have created a custom_env.dat file. The custom_env.dat file contains only the variables that I want to modify. The last line of the custom_env.dat file must read:

#include ${UGII_ROOT_DIR}\ugii_env.dat

to call the standard ugii_env.dat file. Note: the # sign must be included in the line. In this usage the # sign is not used for commenting. If the # sign is missing, UG crashes during startup.

As UG starts, the variables are read and set in the custom_env.dat file first. Then UG reads and sets the variables from the standard ugii_env.dat file. If the same variable exists within the standard ugii_env.dat file, the variable is not set again.

This file can be located locally on the users machine or located on a network server that is accessed by all users.  


Set the UGII_ENV_FILE variable to point to the custom_env.dat file to read the customized variables.

This method leaves the default ugii_env.dat file intact and you do not have to worry about the ugii_env.dat getting changed during update installations.

This information was found on the WWW.plmworld.net citizens area.

RE: Coustomising ugii_env.dat

Nice catch there.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

(OP)
So basically what we are saying here is that the file to which UGII_ENV_FILE points to need not be a complete ugii_env.dat file, but only the CHANGES that we wish to make to the standard file.  Any changes made in the custom file will overwrite the default settings on the ugii_env.dat in UGII_BASE_DIR.  So the next bit of clarification is what is the customised file called - ugii_env.dat or custom.dat?

For info, with CADDS5, we had a .caddsrc file which was all of PTCs settings, and left well alone, a .caddsrc-local file, which contained site modifiations, and a .caddsenv, which could carry individual users tweaks (on a personal, rather than shared, drive).

RE: Coustomising ugii_env.dat

scotty7,

Out of the box (no customizations), NX will use ugii_env.dat by default.  You can name your custom .dat file anything you want as long as it's defined with that same name (path) in your batch file that launches NX.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

(OP)
Sorry, I must be being a bit dim here.  
So, I have a local, networked drive.  I point UG to it by setting UGII_ENV_DIR, then create a file called custom.dat, lob my changes only into it and put it alongside a copy of the ugii_env.dat file on the network drive, and it all works?
'Cos we alrady have 2 ugii_env.dat files on this drive with different names and settings (pointing to metric.def or english.def), so which one would win out?  We use the batch file that launches UG/Teamcenter to decide which to use.

RE: Coustomising ugii_env.dat

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.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

(OP)
Thanks, Tim.  Yes, this makes sense, but it makes me wonder why our local UGS guys have set us up with a complete copy of the ugii_env.dat file, to which they have made changes, in the custom directory and pointed at this.
The current exercise moving from NX2 to NX4 (and getting all the tweaks in metric.def into the dpv file), and putting all of the changes in the customised ugii_env.dat file onto the new ugii_env.dat file for NX4, has been a nightmare, which UGS didn't tell us we (or they) had to do.  Being relatively new to UG, we got a bit of a shock.
Hopefully I can use your model for the next upgrade (hopefully NX6).

RE: Coustomising ugii_env.dat

scotty7,

I would recommend visiting the bbsnotes from Siemens GTAC website.  Check out the NX CAD newsgroups and Rob Cohon (a Siemens employee) will usually post customization files, from which I've based most of my setup.

I tend to find it easier to see what someone else has put in their files, then try to work backwards from there, making changes as needed.

As far as the custom env.dat files, it really doesn't matter how you do it...you can make an exact copy of ugii_env.dat or just include the variables you want.  It's still going to work the same way.  I just prefer to have only the ones I have changed in my .dat file for ease of editing later on down the road, if necessary.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

(OP)
Agree, Tim.  The issue we had is that the ugii_env.dat for NX4 is quite a bit bigger than that for NX2, so either you start from scratch and build all of the changes back into the vanilla file, or add one line and point it at your existing custom.dat file.  The latter (as you have it) seems a lot easier to manage (having done the former myself).

RE: Coustomising ugii_env.dat

Would the customizations go before the program launch in the batch file or after it?  My guess is before, because once the program is launched it's not looking at lines in the batch file anymore.

TIA

Mike

RE: Coustomising ugii_env.dat

Mike,

It depends on what variables you're wanting to set.  However in the big picture, you can use multiple files to call out customizations...it just all depends on where they originate in the out of the box launch of NX.

Tim Flater
Senior Designer
Enkei America, Inc.
www.enkei.com

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.

RE: Coustomising ugii_env.dat

Mainly I'm looking to add things like our company's custom symbols, title blocks, drawing notes, etc.  Nothing really tricky or fancy.  Yet. ; ) Doing it all in a batch file sounds easier when making changes or doing installs on new computers.  Most of my previous CAD life has been as a user.  It's just now that I'm having to do some admin also.  I want to try to keep it as simple as possible.

Mike

Mike

RE: Coustomising ugii_env.dat

(OP)
The thing to remember with UG is that it takes the first instance of the variable only.  If the variable crops up again, even in a different file, it ignores it.  So it is important to get the order of batch files right so that you get what you thought you were going to get.

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