Showing results for 
Search instead for 
Do you mean 
Reply

NXOpen C++: Cannot find the user defined attributes

Hi everyone.

    Recently I am undergoing a project to get the attribute of Routing:: Stock object. One problem really confused me. 

    For the default attributes, I can get its value by GetUserAttributeAsString(). However, when I add an self_defined attribute to the stock, it just cannot find the attribute. I checked in the property list and I can find the attribute add by myself(As shown in the picture, attribute "TEST" is defined by myself), but I just cannot reach its value by the NXOpen C++ function.

1.PNG3.PNG4.PNG

 

4 REPLIES

Re: NXOpen C++: Cannot find the user defined attributes

Have you tried GetStringUserAttribute()?

 

Have you tried GetUserAttributes() to get all of the attributes on the object to see if your test array is included there? Maybe there is an inadvertent space in the name (" test" or "test ") so the name string you are supplying ("test") does not match.

 

 

Re: NXOpen C++: Cannot find the user defined attributes

I have tried it but I just doesn't include the attribute defined by myself. And I also checked the name, there is no space in the name. 

And I also try to add a new element to an existed attribute which can be reached, and it just return a same value to me. It is extremly confusing.

2.PNG

Re: NXOpen C++: Cannot find the user defined attributes

Hi,
I have quit the same problem. Do you find a solution or a bypass?

Thank in advance

Re: NXOpen C++: Cannot find the user defined attributes

the attribute is assign on the body feature of the stock, you need to get the attribute from the body feature of the stock