Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Change part attribute with journal when working in drawing (master model)

Status
Not open for further replies.

MartijnH

Mechanical
Joined
Sep 24, 2013
Messages
18
Location
NL
Hi,

I'm trying to set part attributes with a VB journal. This all works fine when I'm in the part itself by using:

Code:
Dim workPart As Part = theSession.Parts.Work
and further on
Code:
workPart.SetUserAttribute(_attributeTitle1, -1, _attributeValue1, Update.Option.Later)

However, when I'm in the drawing of this part (master model), I cannot set the attribute of the actual part, it only sets the ?object? attribute of the drawing. Is there a method to set the part attribute? Or do I have to open the part and set the attributes there by using some code to open the part in the background?
 
You can set the part attributes of a component part file while working in the assembly. Open an assembly, start the journal recorder, select a component, edit properties -> attributes, make sure you change the "apply to" option to "part". The resulting recorded code should show you how to apply an attribute to the part.

You will need write access to the component part file so that you can save the changes you make to it.

download.aspx


www.nxjournaling.com
 
How do I get into this window? I'm working in NX 10.0, but I do not see the drop down menu in the window? I go to File > Properties and then I only see 'Displayed part properties'. Is there another way to reach the window you show?

UPDATE: Sorry, I found the menu by right clicking on the part in the assembly navigator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top