I am attempting to replicate the Assembly Part Family Update functionality (Assemblies -> Components -> Part Family Update) through VB.Net and I have found the the NXOpen.UF.UFAssem.InstanceIntent object in the Visual Studio Object Browser but have yet to find any examples showing how to use it. Does anyone have any suggestions?
So, you are looking to update the part family members?
If so, I'm not sure NXOpen.UF.UFAssem.InstanceIntent is what you need. NXOpen.UF.Part.UpdateFamilyInstance seems more appropriate...
If the family members do not exist yet, the .GetPartFamilyManager.EstablishMember method might come in handy.
It seems confusing but the instances are already created and I am replacing one with another in an assembly. The assembly then needs to be updated to reflect the new component. In an NX assembly this would be done by selecting Assemblies -> Components -> Part Family Update but I am wanting to do this programmatically.
Have you already tried to record a journal from the manual action?
Recording a journal is the easiest way to get the methods involved to do it programmatically.
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk Testing: NX12.0 Preparing: NX12.0
Employees of the customers, together we are strong
How to Get the Most from Your Signature in the Community
Just a quick response.
I'm not sure if I got the topic.
You try to update a component wich is a family member and has instance intents to a matching member?
You can use
NXOpen.UF.UFSession.GetUFSession().Assem.EvalInstanceIntent( ref Instance, false, out Status);
to obtain informations and for an update if you set parameter 2 TRUE.
(see documentation for details)
Attached you will find a static method I use for this.
Unfortunatelly it's commented in german and has a lot of our company specific stuff in it.
But it should give an idea.