Message 1 of 7
Visibility in drawings environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i have an iLogic for drawing environment, i want that when i run it, all the part with prefix "-" in solidbody name be hidden.
Sub Main()
Dim view As DrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select view")
Dim assembly As AssemblyDocument = view.ReferencedDocumentDescriptor.ReferencedDocument
For Each occ As ComponentOccurrence In assembly.ComponentDefinition.Occurrences
Dim occDoc As Document = occ.Definition.Document
If (occDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject) Then
Dim partDoc As PartDocument = occDoc
Dim name As String = partDoc.ComponentDefinition.SurfaceBodies.Item(1).Name
If (name.StartsWith("-")) Then
hideOccurence(view, occ)
End If
End If
Next
End Sub
1) It doesn't work when those parts with prefix "-" are parts of assembly, is it possible to fix it?
2) it would be even better if it is possible to make iLogic in such a way that it in the drawing environment in the tree, controls "Visibility"
now, iLogic controls the visibility lines in the drawing area, not in the tree