- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Does anyone know how you would get a list of which parts in assembly are being paired together with an iMate?
I've got this code to list them out, but I want to be able to see that I've got one iMate matched up for the one housing, but that i then need to import 5x more of the part to fill up all the iMates... but I can't tell what's being consumed or not.
Dim oAssyDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oAsmCompDef As AssemblyComponentDefinition = oAssyDoc.ComponentDefinition
Dim oOcc As ComponentOccurrence
Dim ICount As Integer
'strip color overrides at the assembly level
For Each oOcc In oAsmCompDef.Occurrences
ICount = oOcc.iMateDefinitions.Count
Logger.Info("Component Name: {0} || {1}", oOcc.Name, ICount)
For i = 1 To ICount
Logger.Info("iMate ReferenceComponent: {0}", oOcc.iMateDefinitions.Item(i).ReferenceComponent)
Logger.Info("iMate Name: {0}", oOcc.iMateDefinitions.Item(i).Name)
Next
Logger.Info("")
Next
Logger.Info("Assy iMate Name: {0}", oAssyDoc.ComponentDefinition.iMateDefinitions.Item(1).Name)
Solved! Go to Solution.
Link copied