Message 1 of 2
Replace iAssemblyMember

Not applicable
05-11-2007
06:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
In a assembly I want to replace a occurence which is a iAssemblyMember. (iAssemblyFactory1.iam with active member Position2)
Herefor I've copied the iAssemblyFactory1 file to another filename. (iAssemblyFactory2.iam with active member Position2)
Now I want to replace iAssemblyFactory1 with iAssemblyFactory2.
If I do this manualy inside Inventor with replace I get the change to select which member to use. Inventor makes then automatically the new Member in it's own directory.
With VB6 I can replace iAssemblyFactory1 with iAssemblyFactory2 but then the iAssemblymember1 (Position2) is repaced by the iAssemblyFactory2 which is not good.
How can I replace the members?
I use INV11 SP2 and VB6.
Geert
I tried this code which replace a member1 with the new factory2.
Dim oOccurrences As Inventor.ComponentOccurrences
Set oOccurrences = oAsmDoc.ComponentDefinition.Occurrences
Dim oOccurrence As Inventor.ComponentOccurrence
Set oOccurrence = oSelectSet.Item(i)
'strNew_Modelnaam = new iAssemblyFactory file
oOccurrence.Replace strNew_Modelnaam, False
How can I select a member of the Factory to replace?
I do know its name already. (is the same as the origin)
I want to replace this occurence with another iAssembly Member
In a assembly I want to replace a occurence which is a iAssemblyMember. (iAssemblyFactory1.iam with active member Position2)
Herefor I've copied the iAssemblyFactory1 file to another filename. (iAssemblyFactory2.iam with active member Position2)
Now I want to replace iAssemblyFactory1 with iAssemblyFactory2.
If I do this manualy inside Inventor with replace I get the change to select which member to use. Inventor makes then automatically the new Member in it's own directory.
With VB6 I can replace iAssemblyFactory1 with iAssemblyFactory2 but then the iAssemblymember1 (Position2) is repaced by the iAssemblyFactory2 which is not good.
How can I replace the members?
I use INV11 SP2 and VB6.
Geert
I tried this code which replace a member1 with the new factory2.
Dim oOccurrences As Inventor.ComponentOccurrences
Set oOccurrences = oAsmDoc.ComponentDefinition.Occurrences
Dim oOccurrence As Inventor.ComponentOccurrence
Set oOccurrence = oSelectSet.Item(i)
'strNew_Modelnaam = new iAssemblyFactory file
oOccurrence.Replace strNew_Modelnaam, False
How can I select a member of the Factory to replace?
I do know its name already. (is the same as the origin)
I want to replace this occurence with another iAssembly Member