Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Journal file to write part attribute 1

Status
Not open for further replies.

rossob

Mechanical
Jul 22, 2007
70
Does anyone know if there is a journal file, etc available that can automatically add a part attribute DB_PART_NO to a part file (native NX), and populate the value with the files part name?

The reason I ask is that because for deformable parts/part families (using a raw material part number) to be called up properly in a BOM, I need the BOM to read the DB_PART_NO field of the part.

We have been replicating a model from Mechanical Desktop into NX over the past 3-4 months, without the need to do any drawings (as we already had a full set of working drawings). Now it is time to do some drawings/BOMs and have dicovered that we need to add DB_PART_NO to all parts for our BOMs to work correctly.

I realise that when you import files into TeamCentre it automatically adds this, but this is not really an option at the moment.

Any help would be most appreciated.

Ross

NX5.0.4.1 WinXP SP2
SolidWorks 2007
 
Replies continue below

Recommended for you

I think so John. I don't have a GRIP compile license, but think i do have th eexecutable license

Ross

NX5.0.4.1 WinXP SP2
SolidWorks 2007
 
No, not at all. That would be great thanks John.

Ross

NX5.0.4.1 WinXP SP2
SolidWorks 2007
 
Try this. It has no error catchment but that could easily be added.
This outputs the file name to DB_PART_NO.
Filename being:

path = "c:\part dir\my_part.prt"
filename = "my_part"
Hope that's right.

Cheers,



Mark Benson
Aerodynamic Model Designer
 
 http://files.engineering.com/getfile.aspx?folder=d7cd333e-d8c6-4d4b-a42b-3bc5620f5201&file=name_to_att.vb
Hi Mark, yes that worked well, many thanks. Is there any way that can be done in a batch?

Ross

NX5.0.4.1 WinXP SP2
SolidWorks 2007
 
Attached, as promised, is a GRIP program which will update all of the files in a specified folder per your request.

This program must be executed from a running session of NX, but you don't have to have any files open, just launch an NX session, go to File -> Execute -> Grip...

When you run the program, you will be prompted for the full path name of the folder where the NX Part files are located that you wish to update. Include the folder's name but NOT the last "\". The program will run until all NX Part files have been updated.

Note that I'm trying to convert this to a batch program, but so far I can't seem to get it to work properly (it's been so long since I wrote anything that ran in batch mode). If I figure it out, I'll pass along that program as well.

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.
 
John, that worked well thank you very much. It will certainly save us many hours.

Ross

NX5.0.4.1 WinXP SP2
SolidWorks 2007
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor