- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The issue is that in my company we until 2 yrs ago we was using thinkdesign, a very old and obsolete cad, but it has a very interesting feature: you could hide some parts and then switch between vibile and invisible parts, factually creating a sort of "otherverse" in wich the engineers could "park" some parts they want to dinamically hide in the workflow process.
Listening to this specific complain i am trying to recreate this by ilogic.
The rule as i written it now search all parts (leaf) of the tree, check one by one if they are visible (and make them invisible) and vice-versa.
However, i am encountering a problem that i've never seen before: Impossible to find component called System.__ComObject.
Any help?
' Get the active assembly. Dim oAsmDoc As AssemblyDocument oAsmDoc = ThisApplication.ActiveDocument ' Get the assembly component definition. Dim oAsmDef As AssemblyComponentDefinition oAsmDef = oAsmDoc.ComponentDefinition ' Get all of the leaf occurrences of the assembly. Dim oLeafOccs As ComponentOccurrencesEnumerator oLeafOccs = oAsmDef.Occurrences.AllLeafOccurrences ' Iterate through the occurrences and print the name. Dim cnt As Integer cnt = 0 Dim oOcc As ComponentOccurrence For Each oOcc In oLeafOccs If Component.Visible(oOcc) = True Then Component.Visible(oOcc) = False cnt = cnt + 1 Else Component.Visible(oOcc) = True cnt = cnt + 1 End If Next
Solved! Go to Solution.