Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Custom drawing title blocks 5

Status
Not open for further replies.

Lunar7

Automotive
Jul 20, 2007
45
0
0
NZ
I have a range of standard commpany title blocks as symbols in I-deas or as AutoCAD Blocks I would like to use in NX5 Drafting

I'm sure there is any easy way to do this, but an not sure where to start, can anyone help ?
 
Replies continue below

Recommended for you

I have it installed as D:\Unigraphics NX3\UGII

My install path is non standard I think out of the Box it wants to go somewhere like.

C:\Program files\ugs\NX-3\UGII

With these paths here a tip. Don't leave any spaces in the directory names that you chose to use. Otherwise some utilities and translators occasionally struggle.

I just take a backup of the original by copying and renaming it to something like "ug_env_original.dat". then I go ahead and edit the file.

The better way to go is to script the variables in a start-up batch file and start NX from that.

Don't do that yet though better to change one thing at a time just get your patterns working first.

Cheers

Hudson
 
OK. I think I located file but it's actually ugii_env.dat, not ug_env.dat. That's why my search couldn't find it.

Now that we've located that, it seems I have have two undesirable choices: (1) Place my pattern files in the UGII directory of every user, which will rob me of the ability to change all patterns/drawing formats by changing one file. I will have to go into every user's UGII directory and replace/edit their respective pattern files. (2) Redirect the pattern file location in every user's ugii_env.dat file to a common location on the network. While I will be able to change a pattern/drawing format by modifying only one file, I may experience complications when updating UG.

If I have my facts straight it seems that option 2 may be the lesser of the two evils. I'll basically have to go into ugii_env.dat and point it at the desired pattern directory on the network when we update.

Speaking of updating, does anyone know if GM is completely up on NX5? I'm a little cut-off from the mainstream.
 
Our site is setup using a customized custom_env.dat file (note: file name does not matter) located on our network system. In this file place any variables that you want have point to any site customizations you need. For example the UGII_PATDIR variable.

The only requirement to using this method is the last entry at the end of the custom_env.dat file. It must read exactly as shown below:

# last line reads the standard ugii_env.dat file located on each users machine
# the line needs the pound sign in front to work
#include ${UGII_ROOT_DIR}\ugii_env.dat

The first 2 lines are comments for reminders to the command. The last line then reads the ugii_env.dat on each users machine. What ever variables defined in the custom_env.dat file take precidence over what is defined in the ugii_env.dat file.

Now, on each users machine make the following modifications:
1. Mapped a drive to access the folder containing your customizations. For example: V:.
2. Modify the system variable UGII_ENV_FILE variable to point to the custom_env.dat file. Example: UGII_ENV_FILE=V:\custom_env.dat

Now you can make global site changes that all users see when the software starts.

One other advantage to using this method, when you upgrade to the next version of NX, your customizations carry forward and do not have to be redefined.
 
I'd advise that when you do upgrade to the next version of NX that you very carefully check the out of the box ugii_env.dat file since new variables are introduced for new or changing modules and old ones are retired from time to time. It is always better to give it a thorough going over before you start working with the data.

Best Regards

Hudson
 
Hudson888 wrote: "Start by creating a drawing sheet of the correct size in drafting then go Format>Pattern>Retrieve"

I can find this under in NX3, but Format is empty wrt Patterns in NX6. Where did it go?
 
Thanks, I'm going to try that.

Then is there a code that automatically inserts the assy name and the scale that is used. Something similar to <$t> which inserts +/-
 
These were the new 'Automatic Text' items added in NX 5:

<W@$SH_SHEET_NUMBER> Sheet number of the current sheet

<W@$SH_NUMBER_OF_SHEETS> Number of sheets in the current part

<W@$SH_SHEET_SCALE_NUMERATOR> Numerator of the sheet scale

<W@$SH_SHEET_SCALE_DENOMINATOR> Denominator of the sheet scale

<W@$SH_SHEET_SIZE> Size of the current sheet

<W@$SH_SHEET_UNITS> Units of the current sheet

<W@$SH_SHEET_PROJECTION_ANGLE> Projection angle symbol of the current sheet

<W@$SH_MASTER_PART_NAME> Master Model drawing sheet part name

<W@$SH_PART_NAME> Sheet part name


John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Yes, but it's not as direct. There is an Expression function which will extract the current date and time and from there you can pass the results to an Attribute which can be referenced by a note embedded in your drawing template.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
I managed to create this:

In de expression editor (in modeling -> Ctrl-E) create the following expressions (all type string):

MyDate = StringUpper(dateTimeString("localTime?", True))
MyDay = subString(MyDate, 9, 10)
MyMonth = subString(MyDate, 5, 7)
MyYear = subString(MyDate, 21, 25)
MyTimeStamp = MyDay + " " + MyMonth + " " + MyYear

Then in Drafting pasted this text into a note: <X0@MyTimeStamp>

The only thing I'm not able to do (without opening the expressions editor) is update the expression. Is there a shortcut for that?
 
Try going to...

Tools -> Update -> Update for External Change

Ostensibly this option was designed to be used to manually force NX to synchronize a part file's attributes with those it shares with TeamCenter. However, even if you don't have TeamCenter this usually forces the attributes to update anyway. Give it a try and see if that helps.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
I have trouble showing a pattern in a sheet. This is odd as I've already tried this several weeks ago without any problems at all. I can't figure out what I'm doing different.

This is what I do:

- New File
- In Modeling: use basic curves to draw borders and title block
- Settings: File > Options > Save Options > Pattern Data Only
- Save file

- New File
- In Drafting: Format > Pattern > Retrieve Pattern
(sheet now has borders and a table)
- Save File

- Find file 'ugii_env.dat'
- Change line '#UGII_PATDIR=' to 'UGII_PATDIR=H:\Temp\MyPatterns'
- Restart NX

But when I open the file that should contain the pattern, I only find an outline of the pattern. I do not find the curves that I've drawn myself.

Any help is greatly appreciated.

(There's one thing I noticed several weeks ago and that is that when I reverted the edit in ugii_env.dat that the pattern could still be found. I'm not sure if this has something to do with it, but I thought it was odd.)
 
I still don't know why the pattern does not show up. But apart from that, now I have another problem -> I can not use text in modeling as I can in drafting. So I can not save the text attributes in the part/pattern.

I'm feeling not getting anywhere. What actually is the way of working for this?
 
When I did our title blocks I created them in Drafting mode, then exported them as CGM files. I then imported the CGM files into new parts in Modeling. The text will come in as geometry, and can be saved with the pattern. Remember that the 'text' is not really text, and won't be editable, so don't include anything that you'll want to change once the pattern is in a drawing. I did our editable text as separate parts that are imported into the drawing after the pattern is brought in.

Mike
 
I have NX5.0 and have been trying to create new borders for it.

I started with creating a drafted version of my title block.
From here I exported it out as a cgm.

I then imported it into a model and changed the Save Options to Pattern Data Only.
I then saved the file.

From here I opened a drawing and went to Format and there wasn't a "Pattern" option.

Does anyone know why this would be?

Paragon Medical
 
If you mean whether making changes to the pattern will propagate automatically to drawings, it should. I have made several changes to our patterns, as we're still dialing everything in, and was surprised to see that the drawings reflect these changes.

Mike
 
@Mike14 Oct 08 11:36
You're right about the pattern propagation. And you're right about the text import. But then a new worm pops up. The automatic text that John was talking about (4 Oct 08 20:06) doesn't update if it is retrieved from pattern.

I'm a bit confused that this is so difficult. A pattern is not too useful without automatic text.

@myself 12 Oct 08 7:11
I found out that I did not need to change the ugii_env.dat file. Also changing load from folders does not do much here. Sometimes the pattern sticks after a save and sometimes it doesn't. Very erratic.
 
Status
Not open for further replies.
Back
Top