Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Drawing Attributes, NX3, Windows

Status
Not open for further replies.

jackley

Automotive
Sep 2, 2004
263
I am setting up seed parts with attributes in the titleblock (tables) that will be referenced from the model file.

Any way an attribute can be set up to call out the file name?
Our name scheme is, x11111.mldes.prt. I want that to go on the title block in one of the tables.

Justin Ackley
Designer
jackley@gmail.com
 
Replies continue below

Recommended for you

I couldn't find the part attribute but put this together, if you have the KF license.

~~~~~~~~~~~~
#! NX/KF 3.0

DefClass: partAttributeName (ug_base_part);

(String Modifiable) PartName: ug_askCurrentWorkPart();

(Integer Modifiable) setPartNameAttribute: ug_setAttrValue_(
"", //Part Name
"PART_ATTRIBUTE", // Attribute Type
"PART_NAME", // Attribute Name
PartName: // Attribute Value
);

~~~~~~~~

Since this is a seed file you can instantiate this once in the file and have the Part attributes with you all the time. Not the best solution but will get you the partname attribute you want. There is a demand value issue that needs to be resolved so that when you saveAs the attribute will update.

-Dave
PLM Exchange
 
Based on your naming convention it appears you are doing GM work. Do you have and use the GM toolkit (PDL)? If so, you can use the filelog attributes.

If this is the case, let me know and I will give you the attribute names.
 
Yes we have the toolkit. But I can't figure out how to set up an attribute on our drawing formats (seed parts) and have it update with whatever the file name is.

Justin Ackley
Designer
jackley@gmail.com
 
The GM/PDL trick will only work if you are required to fill out the file log. Like the GM/PDL toolkit drawing formats you'll notice the name and other fields are db_name, etc... that is the attribute name. When you fill out the file log then add the format you will see that the name fills out. Only if you create the drawing after you do the file log i believe.

I'll see if i can find a better solution for you then the titleblock example file.

-Dave
PLM Exchange
 
Are you using Teamcenter? If you are using Tc the attribute is db_part_name. As for native, I do believe it's possible but I'm investigating. Please hold...
 
OK, what I was remembering had to do with creating a part list and I don't think it would work since you are trying to get the attribute from your work part and not a component.

Since you have the GM toolkit, I would try creating a seed part with the file-log filled out. File log parses out the part number, class and rev level from the file name when you open it and populates the attributes.

I'll look at it when I get to work tomarrow just because I'm now curious as to whether it will work or if there is another option for you.

One more observation. The naming convention you give in your initial question is unique to GM. (Unless someone else has adopted it?) If you are creating GM drawings you probably could be using the GM drawing program to populate the title block.
 
We have adopted the GM naming scheme. But the only thing that is the same is the mldes, mlasm, and dwgfmt name. That is it.

I know with GM drawings/parts they are named 12345678.mldes.0001.prt. Ours will be x12345.mldes.prt or 12345.mldes.prt (X is prototype, no X is production).

I will mess around with the file log but I don't think that would work just because of the name we use.

We also use our own drawing format.

Justin Ackley
Designer
jackley@gmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor