I am looking for a macro that can delete specific named layers. For example I moved some things to a few layers to be deleted later. They are named "Delete1" "Delete2" etc.
Hello, try this:
Option ExplicitSub main() Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swLayerMgr As SldWorks.LayerMgr Dim i As Integer Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Set swLayerMgr = swModel.GetLayerManager For i = 1 To 99 swLayerMgr.DeleteLayer "Delete" & i NextEnd Sub
Retrieving data ...