Cancel
Showing results for 
Search instead for 
Did you mean: 

Replace Reference Set

Builder
Builder

Here my code

foreach (String str in identifiers)
{
Component comp = (Component)theSession.Parts.Work.ComponentAssembly.RootComponent.FindObject(str);
theSession.Parts.Work.ComponentAssembly.ReplaceReferenceSet(comp, "BODY");
}

 

 

How come when i implment this it leaves all the components that are in the list of "identifiers" untouched.

It finds them, It just doesn't change the reference set of any of the selected components to "BODY". Is there something else I should be Calling?

2 REPLIES

Re: Replace Reference Set

Phenom
Phenom

Do these components have a "BODY" reference set?

The default reference set for solids that NX creates is named "MODEL".

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Replace Reference Set

Honored Contributor
Honored Contributor

Were you able to get this to work?

 

Are the components of interest top level components in the workPart? If not, try {component var}.DirectOwner.ReplaceReferenceSet(...)