In an assembly of 2 parts with 2 members ,member1 and member2.
In member1 parts 1 and 2 are include.
In member2 part 1 is include and part 2 is exclude.
Using this code i'd like to include part 2 in member2, but I can't find the occurrence part 2 :
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
Dim objAsm As SolidEdgeAssembly.AssemblyDocument = objApplication.ActiveDocument
Dim FamilyMemberID As Integer = 0
Dim Occ As Object = Nothing
'Find Id of the family member
For i = 1 To objAsm.AssemblyFamilyMembers.Count
If objAsm.AssemblyFamilyMembers.Item(i).MemberName = "Member2" Then
FamilyMemberID = i
'Get occurrence by string
For i = 0 To objAsm.Occurrences.Count - 1
If objAsm.Occurrences(i).name = "part 2" Then
Occ = objAsm.Occurrences(i)
'Include Occurrence to family member
If objAsm.IsFileFamilyByDocument = True And Not (FamilyMemberID = 0) And Not (Occ Is Nothing) Then
Catch ex As Exception
Posted by: RomualdPost date: 8/19/2013 8:32:44 AM