Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everybody
I have a piece of rule I need a little help with it.
The rule should check all parts, and if the part is in "reference" then I need all solid bodies to be visible in that part.
now it turns the visibility on always.
Can this be done?
Dim openDoc As Document openDoc = ThisDoc.Document Dim oCompDef As Inventor.ComponentDefinition = openDoc.ComponentDefinition Dim oAssyDoc As AssemblyDocument oAssyDoc = ThisApplication.ActiveDocument Dim oDoc As Document = ThisDoc.Document For Each oDoc In oAssyDoc.AllReferencedDocuments For Each SB In oDoc.ComponentDefinition.SurfaceBodies For Each oOcc As ComponentOccurrence In oCompDef.Occurrences.AllLeafOccurrences If oOcc.BOMStructure = BOMStructureEnum.kReferenceBOMStructure Then SB.Visible = True End If If oOcc.BOMStructure <> BOMStructureEnum.kReferenceBOMStructure Then End If Next Next Next
Solved! Go to Solution.