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.
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.
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.
the attribute is assign on the body feature of the stock, you need to get the attribute from the body feature of the stock