I am looking to check the hiddenline status of a part in a drawing. The drawing is made from an assembly. I dont want to take all the segments from the view and check for each of them. I want a way I can just grab the entities that are made from an occurence.
I was hopping to use the drawingcurve(modelobject), but I dont know what to use as the modelobject! is it the edge, edges, component definition... Here some of the code that is not working.
Dim _portePattern As OccurrencePattern = oassbly.ComponentDefinition.OccurrencePatterns.Item("Pattern Porte")
Dim _PoigneeOcc As ComponentOccurrence
Dim _PorteOcc As ComponentOccurrence
Dim PatEle As OccurrencePatternElement
Dim _poigneeDef As ComponentDefinition
Dim _poigneeSFbody As SurfaceBody
Dim _poigneeEdges As Edges
For i As Integer = 1 To _portePattern.OccurrencePatternElements.Count
PatEle = _portePattern.OccurrencePatternElements.Item(i)
Debug.Print(i & "/" & _portePattern.OccurrencePatternElements.Count & "> " & PatEle.Name)
_PorteOcc = PatEle.Occurrences(1)
Debug.Print(_PorteOcc.Name)
For Co As Integer = 1 To _PorteOcc.SubOccurrences.Count
Debug.Print(Co & "/" & _PorteOcc.SubOccurrences.Count & "> " & _PorteOcc.SubOccurrences.Item(Co).Name)
If _PorteOcc.SubOccurrences.Item(Co).Name.ToLower.Contains("poi") Then
_PoigneeOcc = _PorteOcc.SubOccurrences.Item(Co)
_poigneeEdges = _PoigneeOcc.Definition.SurfaceBodies(1).Edges
For Ed As Integer = 1 To _poigneeEdges.Count
Debug.Print(Ed & "/" & _poigneeEdges.Count)
For Each dwgSeg As DrawingCurveSegment In _view.DrawingCurves(_poigneeEdges.Item(Ed))
If dwgSeg.HiddenLine = True Then
dwgSeg.Visible = False
End If
Next
Next
End If
Next
Hi there,
I think you could just pass in the occurrence to DrawingCurves() as is done in this sample code:
I hope this helps.
______________________________________________________________
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!