Find unassociated objects and delete them

Hi everyone,

My company has expressed an interest in an NXOpen button that would allow users to select objects like bodies, curves, sketches etc and delete all other objects/features that are not associated with those selected.

Does anyone have any idea where I would start on finding association between objects/features?

Thanks in advance,

Nick

If you have a reference to a feature object, you can use the .GetParents and .GetChildren methods to find the parent and child features.

If you have a body object, you can use the .GetFeatures method to find the features used to construct the body.

If you have a curve or datum, you can use the .AskObjectFeat method to find the feature that created this object.

By using these methods in concert, you could find all of the features and objects associated to a selected object.

Thank you so much, that is exactly the sort of info I needed to start my digging!

I really appreciate the help