Hello
How can I get the component of a hatched face
Dim swApp As SldWorks
Dim swDoc As ModelDoc2
Dim swDraw As DrawingDoc
Dim swView As View
Dim swViewType As swDrawingViewTypes_e
Dim hatches() As Object
Dim hatchFace As Face2
Dim swComp As Component2
Dim swEntity As Entity
swApp = CreateObject("SldWorks.Application")
swDoc = swApp.ActiveDoc
swDraw = swDoc
swView = swDraw.GetFirstView()
swViewType = swView.Type
If swViewType = swDrawingViewTypes_e.swDrawingSectionView Then
hatches = swView.GetFaceHatches()
If Not hatches Is Nothing Then
hatchFace = hatches(0).Face
swEntity = hatchFace
swComp = hatchFace.GetComponent() ' Return nothing
End If
End If
SolidworksApi macros