- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So On my model ive have a number of work planes which end up crowding the space and generally make it visually busy. the majority of these were implemented at the part or sub assembly level and have been their visibility switched off at that level. however when i place them into the main assembly they still show up.
and the model tree looks like this
this is the code ive attempted to implement but it didn't work
Private Sub HideAllWorkFeatures(AssembleyDoc As AssemblyDocument)
Dim AssyDef = AssembleyDoc.ComponentDefinition
Dim Occurences = AssyDef.IncludingSubOccurences
For Each pOcc As ComponentOccurrence In Occurences
If pOcc.Definition.Type = ObjectTypeEnum.kVirtualComponentDefinitionObject Then 'definitely better way to do this
Else
For Each pWPoint As WorkPoint In pOcc.Definition.workpoints
Dim pWpProx As WorkPointProxy
pOcc.CreateGeometryProxy(pWPoint, pWpProx)
pWpProx.Visible = False
Next
For Each pWPlane As WorkPlane In pOcc.Definition.WorkPlanes
#If DEBUG Then
If pWPlane.Name.Contains("Hole") Then Stop
#End If
Dim pWpProx As WorkPlaneProxy
pOcc.CreateGeometryProxy(pWPlane, pWpProx)
pWpProx.Visible = False
Next
End If
Next
End Sub
HII
Solved! Go to Solution.