08-31-2021
04:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-31-2021
04:27 AM
I'm not strong at Ilogic, so maybe you can help put these together.
I have this now:Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition Dim oOccurrence As ComponentOccurrence For Each oOccurrence In oAsmCompDef.Occurrences If iProperties.Value(oOccurrence.Name, "Custom", "Type") = "CNC machined" oOccurrence.Visible = True Else End If
Now it needs to look through all the Sub assemblies
with this code:
Dim oAsmDoc As AssemblyDocument oAsmDoc = ThisApplication.ActiveDocument Dim oAsmDef As AssemblyComponentDefinition oAsmDef = oAsmDoc.ComponentDefinition Dim oLeafOccs As ComponentOccurrencesEnumerator oLeafOccs = oAsmDef.Occurrences.AllLeafOccurrences Dim oOcc As ComponentOccurrence For Each oOcc In oLeafOccs 'add previous rules Next
What will the whole code look like?