in my assembly part visibility is controlled by a Ilogic rule which selects an Iassembly. This assembly is a parametric model controlled by excel. The visible parts have to be exported to dxf.
Everything is working (iterating through parts, export sheet metal to dxf), but how can I check whether a part is visible within the assembly?
when working with iassemblies it is not the visible property, but the exclude property where you have to look for:
[code]
Dim invProperty As PropertySet
Dim invDoc As Inventor.PartDocument
Dim invAsm As Inventor.AssemblyDocument
Dim invOcc As ComponentOccurrence
Set invAsm = invapp.ActiveDocument
For Each invOcc In invAsm.ComponentDefinition.Occurrences
If invOcc.Excluded = False Then
Set invDoc = invOcc.Definition.Document
'check for sheet-metal
If (invDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}") Then
'open sheetmetal document
Set invDoc = invapp.Documents.Open(odocument.FullFileName)
'update inventor model
invapp.ActiveDocument.Update
invapp.ActiveView.Fit
'sla op als dxf
DXF_DataIO
invapp.ActiveDocument.Close (True)
End If
End If
Next
[/code]