grinch33
Mechanical
- Jul 13, 2009
- 51
In the past removing a component instance using
automatically removed any Mating Conditions for that instance.
However since moving to NX8.5 (and using Assembly Constraints) the Assemby Constraints do not get deleted using this function, instead they are left in the part with the constraint definition partially unset.
To reproduce the old behaviour I've been interrogating the instance to get the constraints and deleting them before remoing the instance, which is quite a bit of code.
Recently someone pointed out that I have a bug in this code. So I thought I'd ask you experts
if there was a better way.
Interactively when you delete an instance you get asked if you'd like to delete the Assembly Constraints, but is there some way to do this automatically in code?
Or to put it another way, if deleting the constraints automatically is not possible, what is the easiest way to find the constraints that position a given component instance?
Graham Inchley, Systems Developer, Sandvik Coromant. HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
Code:
UF_ASSEM_remove_instance()
However since moving to NX8.5 (and using Assembly Constraints) the Assemby Constraints do not get deleted using this function, instead they are left in the part with the constraint definition partially unset.
To reproduce the old behaviour I've been interrogating the instance to get the constraints and deleting them before remoing the instance, which is quite a bit of code.
Recently someone pointed out that I have a bug in this code. So I thought I'd ask you experts
![[smarty] [smarty] [smarty]](/data/assets/smilies/smarty.gif)
Interactively when you delete an instance you get asked if you'd like to delete the Assembly Constraints, but is there some way to do this automatically in code?
Or to put it another way, if deleting the constraints automatically is not possible, what is the easiest way to find the constraints that position a given component instance?
Graham Inchley, Systems Developer, Sandvik Coromant. HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5