Hello all,
I have been using iLogic together with iMates for some time to automate assembly creation. I have always used the follwing to automatically generate iMates on place.
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
Dim oOccEnumerator As ComponentOccurrencesEnumerator
oOccEnumerator = oAsmCompDef.Occurrences.AddUsingiMates("file location and part number and extension), False)
The problem I have now is that Part B can contrain to either the left-hand or right-hand side of Part A dependant on if a parameter is set to 'Left' or 'Right'.
Hence for Part B, the composite iMate 'Part A to Part B' can always be used.
Part A contains 2 different composite iMates, 'Part A to Part B' and 'Part A to Right-Hand Part B'
So my logic will be (assuming Part A is already sat in the assembly and I am placing Part B)...
If Tier_Location="Left"
Place Part B while constraining to Part A mating 'Part A to Part B' to 'Part A to Part B'
Else
Place Part B while contraining to Part A mating 'Part A to Part B' to 'Part A to Right-Hand Part B'
End If
Doesn anybody know if there is any way to make this possible in iLogic?