Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using this to go through all occurences
Sub Main Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument Dim oCompDef As AssemblyComponentDefinition = oDoc.ComponentDefinition Dim oOcc_s As ComponentOccurrences = oCompDef.Occurrences 'look at each occurrence in the assembly For Each oOcc As ComponentOccurrence In oOcc_s ListOccurences(oOcc) Next End Sub Sub ListOccurences(oOcc) If Not oOcc.Name.Contains("Weldbead") Try 'Prevents Weldment and simulation file errors 'Do stuff Here! For Each subOcc As ComponentOccurrence In oOcc.SubOccurrences ListOccurences(subOcc) Next Catch'Weldment End Try End If End Sub
In the do stuff here, I want to get the appearance of the occurrence at part level. i.e. "anodise"
I've tried the following:
Component.Color("part1:2")
And also
iProperties.PartColor("part1:2")
But they all just bring back 'As Material' which I assume is actually getting the appearance at assembly level (unless there's an override.)
I feel like it should be pretty simple, but everything I've found about appearances online for other tasks are lines and lines of code.

Solved! Go to Solution.