cancel
Showing results for 
Search instead for 
Did you mean: 

nested object attributes will not update for make display view

Creator
Creator

2015_05_15_10_45_00_NX_9_Modeling_99999_99879_BOM_1.0_WITH_BOM2.0_DETAILS_.png

The 99999-99879-3 Make "Display View"

2015_05_18_09_44_25_NX_9_Modeling_99999_99879_5_99999_99879_5_in_Assembly_99999_99879_3_.png

this is related to this post

The top is the debug view for a list<components> along with the bom view for some reason the 99999-99879-3 is setting in the main view but will not show down in the "Desplay View" for 99999-998779-3.  I did notice that there are two component Id showing for two of the components and wondering why, what do they reference. At any rate all other attributes are setting properly regardless of the the "Display View" used.  Thanks guys and gals

 

8 REPLIES

Re: nested object attributes will not update for make display view

Valued Contributor
Valued Contributor

How do you get the List <components>? Do you check if a component is already added before adding it again? So, do you make sure the list only contains unique components? You might be changing something twice, with differently values apparently

W10 NX11.0.1

Re: nested object attributes will not update for make display view

Valued Contributor
Valued Contributor

Why not use AttributePropertiesBuilder and give it the real part instead of casting to a component?

 

AttributePropertiesBuilder apb;
            NXObject[] obj = new NXObject[1];
            obj[0] = m_basePart;
            apb = s.AttributeManager.CreateAttributePropertiesBuilder(your_basePart, obj, AttributePropertiesBuilder.OperationType.None);

            apb.Category = "your category";
            apb.Title = title;
            apb.StringValue = value;
            apb.
            apb.CreateAttribute();   

 

W10 NX11.0.1

Re: nested object attributes will not update for make display view

Creator
Creator
Well I'm an infant at this. lol. 58 year old and 30 year of programming but this is the first time i've had to address the nx api world. Thanks for adding to my fire hydrant. I will be looking at this. I've had to adopt someone else code. But a big thanks for posting. Will be looking into this.

Re: nested object attributes will not update for make display view

Creator
Creator
that would be in the NXSetAttributes.txt file. no I'm not to sure of that. so a component id is just a number assigned to what was found. I thought it was a reference number that was already in the NX system.

Re: nested object attributes will not update for make display view

Valued Contributor
Valued Contributor

This is easier to start with:

change ((Part)component.Prototype)

to component.Prototype.OwningPart...

W10 NX11.0.1

Re: nested object attributes will not update for make display view

Creator
Creator

Well at the start of this post I think I mentioned I was a neophyte and if I didn't I should have.  I want to thank everyone for throwing NX mud at my chicken wire fence, more and more is sticking.

Re: nested object attributes will not update for make display view

Creator
Creator
can this be done with components as well? would it be possible to see how this is used to update a component or series of components. Since this post I have learned that I don't want to update parts just compenents. Thanks DJS

Re: nested object attributes will not update for make display view

Valued Contributor
Valued Contributor

A component does have the SetUserAttribute method, so yes, I think you can do this. Maybe if you just leave out the cast to Part? (and prototype) Make it component.SetUserAttribute...

 

But the attributes will only be visible in the assembly in which they were created.

W10 NX11.0.1