Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Trying to use a macro or journal to "insert object attribute" into the cell of a table (NX

Status
Not open for further replies.

Pat_db

Automotive
Aug 23, 2018
14
I am trying to make a macro/journal to insert an object attribute into the cell of a table.

When recording the macro my clicks are as follows....right click table cell>click edit text>set category to relationships>click button for insert object attribute>select the item in assembly navigator that I want to pick attributes from>click the attribute>click okay>syntax for that attribute auto fills into text field>close edit text box>value for the attribute gets populated in the cell>stop recording macro.

Now when I try to run this macro it fails at the point in which the list of attribute to pick from opens. Somehow it doesn't know which attribute to pick, even though that was part of the recording.

I tried doing this with both macros and journals. Is this issue a limitation of the software, or am I doing something wrong?
 
Replies continue below

Recommended for you

What version of NX are you using?

Regarding journals, some of the older dialogs don't work with the journal recorder. In these cases you have to write the code by hand; I'm 95% sure you can get a journal to do what you want, but the recorder may not get you there. I don't really use macros, so I can't comment on why that option isn't working for you.

www.nxjournaling.com
 
Nx10

I figured out that if I add a "user entry" in the middle of my macro that prompts you to select the item in your assembly navigator then it works. I think I will have to have it this way so that it will work with any drawing . The object's number in my assembly navigator will be different each time so the macro will simply require you to select which item you want the object attributes to come from. I think the reason it wasn't working was because I recorded the macro by selecting a particular object in the assembly navigator, but if I test it out in any other drawing it doesn't work because there is no object in my assembly navigator with the same number as the one that was used when recording the macro.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor