What is the easiest way to run a macro on all sheets in a drawing.
Not sure if the attached will get you the info you need, but I'll give it a shot
Written by Deepak Gupta and edited by Garrett Hansen
Works like a charm...Ill clean it up a little. But gets the job done...Thanks John.
Put your code in DoTheWork().
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDraw As SldWorks.DrawingDoc
Dim swSheet As SldWorks.Sheet
Dim vSheetNames As Variant
Dim i As Integer
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
If swModel Is Nothing Then Exit Sub
If swModel.GetType <> swDocDRAWING Then Exit Sub
Set swDraw = swModel
vSheetNames = swDraw.GetSheetNames
For i = 0 To UBound(vSheetNames)
Private Sub DoTheWork(swDraw As SldWorks.DrawingDoc)
SolidWorks API Training and Services
Retrieving data ...