I am using C++,ATL/COM to customize the SolidEdge (version ST6). We have an alternate assemblies called "alta1.asm"(1) & "alta2.asm" (2)and both having two memebers Memeber1, Memeber2 (See the attached pic "Alt2.png" (1&2))
After switching to Memeber1: Alta2.asm!Member1 | |----Alta1.asm!Member1 |--------p1.par |--------p2.par
By using "occurrence overides" option(which is avilable at "Alternate Assemblies" window , for info see the attached pic "Alt2.png"(3)) , we override the Alta2.asm occurences . By doing this, If we switch to Memeber1 in Alta2.asm, automatically Alta1.asm also switch to Member1.
API: By using the SolidEdge APIs, I am able to traverse through enter model, But I am facing the below issue.
we are unable to do the SaveAs (By using API) on "Alta1.asm!Member2" in "Alta2.asm!Member2"
I did some work around to avoid the SaveAs issue like below.. 1. Open the "Alta1.asm!Member2" in SolidEdge new window by using Open API 2. Did SaveAs with new file name like "new_Alta1.asm"
To update the "Alta2.asm!Member2" pathfibder with new_Alta1.asm, I did the below steps..
1. Get the occurrence object of "Alta1.asm!Member2" in "Alta2.asm!Member2" 2. By using "Replace" API, I replaced the "Alta1.asm!Member1" with "new_Alta1.asm!Member2".
Issue: After this replace action, "occurrence override" option is not updated with new assembly. Because of this, If I switch to Member1 in the "Alta2.asm" (Alta2.asm!Member1). Ther is no automatic member switching in "new_Alta1.asm"
The pathfinder is like below... Alta2.asm!Member1 | |----new_Alta1.asm!Member2 |--------p1.par |--------p2.par
Your Alternate Assembly session is probably in "Global Edit Mode/Apply edits to all members=ON" which will cause the occurrence definition in all members to be replaced to the new file. You can set the property SolidEdge.Assembly.Interop.AssemblyFamilyMembers.GlobalEditMode=False before Replace so the occurrence defintion is only changed in the current/active member.
Also, unless I am not following you, the save as operation should be initiated from AssemblyDocument.SaveAs.