poc275
Aerospace
- Feb 12, 2016
- 1
Hi guys,
This is a follow up question to this thread: thread561-384240
Does anybody know if it is possible to automatically delete an attribute on the component and not the instance using NXOpen? I can remove and change the instance attributes no problem, but the presence of a component attribute of the same name overrides what we can see in NX.
This is what I've got so far:
[pre]
Component[] children = theSession.Parts.Work.ComponentAssembly.RootComponent.GetChildren();
foreach (Component child in children)
{
child.SetInstanceUserAttribute("CALLOUT", 0, "Instance Callout here...", Update.Option.Now);
}
[/pre]
I've tried the following but this doesn't delete the component attribute, only the instance:
[pre]child.DeleteInstanceUserAttribute(NXObject.AttributeType.String, "CALLOUT", false, Update.Option.Now);[/pre]
Any information will be gratefully received.
This is a follow up question to this thread: thread561-384240
Does anybody know if it is possible to automatically delete an attribute on the component and not the instance using NXOpen? I can remove and change the instance attributes no problem, but the presence of a component attribute of the same name overrides what we can see in NX.
This is what I've got so far:
[pre]
Component[] children = theSession.Parts.Work.ComponentAssembly.RootComponent.GetChildren();
foreach (Component child in children)
{
child.SetInstanceUserAttribute("CALLOUT", 0, "Instance Callout here...", Update.Option.Now);
}
[/pre]
I've tried the following but this doesn't delete the component attribute, only the instance:
[pre]child.DeleteInstanceUserAttribute(NXObject.AttributeType.String, "CALLOUT", false, Update.Option.Now);[/pre]
Any information will be gratefully received.