×
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

NX - have the file name as a part attribute or string expression
2

NX - have the file name as a part attribute or string expression

NX - have the file name as a part attribute or string expression

(OP)
Hi all,

is it possibile to extract the file name of an NX file and store it as a string expression or a part attribute?

Thanks a lot!

RE: NX - have the file name as a part attribute or string expression

(OP)
Btw,

I am using NX6

RE: NX - have the file name as a part attribute or string expression

It could be done with a grip or journal, but it would not be associative to the filename. What are you trying to achieve?

Chris T.
Project Design Analyst
Kohler Co. Engine Division
Using NX6

RE: NX - have the file name as a part attribute or string expression

(OP)
We manufacture tools and molds, we use Moldwizard and we are installing a new ERP.
What I would like to achieve is to have an unique part code associated to each component we produce internally from scratch.
The code I was thinking about is done like these "xxxxxx yyy zzz ttt" where:
xxxxxx is the unique code of the project,
yyy the family code,
zzz the sub-family code,
ttt the part code.
Since I would like this code to be automatically generated by NX, I was thinking about extracting the last 3 digits of the file name, which are randomly defined by Moldwizard when the part is input.
I think it is not important that the code is associative, I just need it to be generated at the beginning.

RE: NX - have the file name as a part attribute or string expression

OK, that makes sense. I will try to create a simple grip program for you this afternoon.

Chris T.
Project Design Analyst
Kohler Co. Engine Division
Using NX6

RE: NX - have the file name as a part attribute or string expression

(OP)
Thank you very much! Very kind :)

RE: NX - have the file name as a part attribute or string expression

Attached is a very simple grip program that will capture the name of the current file and add it to a part attribute titled "Filename"

This is a very generic program, but it should be pretty easy to customized to meet your needs.

Chris T.
Project Design Analyst
Kohler Co. Engine Division
Using NX6

RE: NX - have the file name as a part attribute or string expression

Hi wiengines,
Is it possible for a grip to extract the last three digits of the file name then create & add it to an attribute named "DETAIL NUMBER" ?

Thanks,
James
NX7.5

RE: NX - have the file name as a part attribute or string expression

Attached is a GRIP program which will extract the last 3 characters of the name portion of a part file name and create a Part Attribute named 'DETAIL NUMBER' with these characters as it's value.

After downloading the file, edit the file extension from .zipper to .zip before extracting the files.

Have fun, and let me know if this is what you were looking for.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: NX - have the file name as a part attribute or string expression

Thank you very much Mr. Baker. That worked like a champ. Man that's service!

Do you have a grip (or anything else) that will create & fill out a "QTY" attribute for every component in an NX7.5 assembly?

James

RE: NX - have the file name as a part attribute or string expression

Quote (jkcone)

Do you have a grip (or anything else) that will create & fill out a "QTY" attribute for every component in an NX7.5 assembly?

Does the parts list functionality not serve your needs?

www.nxjournaling.com

RE: NX - have the file name as a part attribute or string expression

Hi cowski,
We do use the parts list for our "bill of material" but the shop wants the quantity in the detail drawing's title block as well.

Jmaes

RE: NX - have the file name as a part attribute or string expression

How are you going to handle the situation where the same "detail" part is used in more than one Assembly with the possibility that the quantity could be different in one Assembly versus another?

BTW, I think it's feasible to develop a GRIP program which would assign a 'QTY' attribute to the Components of an Assembly. However, those attributes would NOT be seen at the piece part level. They would be assigned to the Component objects which are contained and saved in the Assembly itself. In other words, these attributes would be 'local' content only. If you query the 'Properties' of the Component in the context of the Assembly, the attribute would be there, but if you opened the Master Model of that Component as it's own Work Part and open the File -> Properties -> Attributes dialog you would NOT see this attribute.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: NX - have the file name as a part attribute or string expression

We wouldn't use this QTY program until the end of the design. By that time all components except fasteners are in this unique job folder with their own file name & detail # & wouldn't be a component in another design. The fasteners are family member files which cannot be written to. The QTY program would need to be able skip over family member & read only files & continue on.

This QTY program would be ran from the upper most parent assembly file, the main design file, which has no geometry just components. It would give the quantity of the components in this main assembly. It would need to write this QTY attribute in the sub-components not in the main assembly. If you opened only one of the components by itself you'd need to see this attribute. If it could write to files ending in three numbers only & not write to files ending letters that's be even better but not necessary.

Thanks,
James

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