ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
MAMahaveer Appini03/04/2024

I have a pre selected face and now I want a vba macro to change the hatch pattern of the selected face.
for example: "iso steel" to "honeycomb" 

My code:

Option Explicit

Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDrawing As SldWorks.DrawingDoc
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFace As SldWorks.Face2
Dim i As Integer
Dim count As Integer

Sub main()

Set swApp = Application.SldWork