Message 1 of 3
Disable workplaneproxy visibility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have code to disable the visibility of all workfeatures. But in the main assembler I can still see workplanes. This type is workplaceproxy, how can I disable the visibility of these workplanes?
Sub OffFeatures2()
Dim oAssyDoc As AssemblyDocument
Set oAssyDoc = ThisApplication.ActiveDocument
Call offAllFeature(oAssyDoc, False)
For Each oDoc In oAssyDoc.AllReferencedDocuments
Call offAllFeature(oDoc, False)
Next
Dim oCCs As ComponentOccurrences
Set oCCs = oAssyDoc.ComponentDefinition.Occurrences
End Sub
Sub offAllFeature(oDoc As Document, wfBoolean As Boolean)
For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
oWorkPlane.Visible = wfBoolean
Next
For Each oWorkAxis In oDoc.ComponentDefinition.WorkAxes
oWorkAxis.Visible = wfBoolean
Next
For Each oWorkPoint In oDoc.ComponentDefinition.WorkPoints
oWorkPoint.Visible = wfBoolean
Next
For Each oSketch In oDoc.ComponentDefinition.Sketches
oSketch.Visible = wfBoolean
Next
If Not oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
For Each oSketch3D In oDoc.ComponentDefinition.Sketches3D
oSketch3D.Visible = wfBoolean
Next
End If
End Sub