- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear,
I'm creating a small product configurator usig ilogic. It all works fine, but i've i challange:
controlling the visibility of the components in a drawing view
In simple words, every occourense of my assembly has an custum Ipropertie calles "Positie". there where 4 values (Bodem, Zij, Kop, Deksel and Overig)
In a drawing view i only want to see the parts that has a spesific value of the ipropertie "Positie".
I found a sample code for VBA, but I cann't get it worked in ilogic.:
Sub HideSecond()
'Assumes you have an open drawing
'Assumes that view 1 of the active sheet is an assembly
'Turns off visibility of assembly's second component in open drawing's first view
'Get the drawing document
Dim oDrawingDocument As Inventor.DrawingDocument
Set oDrawingDocument = ThisApplication.ActiveDocument
'Get the first view
Dim oView As Inventor.DrawingView
Set oView = oDrawingDocument.ActiveSheet.DrawingViews.Item(1)
'Get the assembly document referenced by the view
Dim oAssemblyDocument As Inventor.AssemblyDocument
Set oAssemblyDocument = oView.ReferencedDocumentDescriptor.ReferencedDocument
'Get the second component occurrence of the assembly document
Dim oSecondOccurrence As Inventor.ComponentOccurrence
Set oSecondOccurrence = oAssemblyDocument.ComponentDefinition.Occurrences.Item(2)
'Turn off visibility of the second occurrence
oView.SetVisibility oSecondOccurrence, False
End Sub
Can someone give me a hind to turn this into ilogic and add the option to check the ipropertie to turn on the visibility
Kind regards,
theo Bot
Solved! Go to Solution.