I am attempting to create a macro to replace a single word in a line of text on a drawing sheet format.
I start record – edit sheet format – select the line of text – highlight what I wish to remove – type in the desired text – edit sheet – zoom to fit - save - end record - save macro.
This is what the macro looks like but doesn’t change anything when I run it.
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Part.EditTemplate
Part.EditSketch
boolstatus = Part.Extension.SelectByID2("DetailItem98@Sheet Format1", "NOTE", 0.08486415654015, 0.4204723112481, 0, False, 0, Nothing, 0)
Part.EditSheet
Part.EditSketch
Part.ClearSelection2 True
Part.ViewZoomtofit2
Part.ViewZoomtofit2
Part.ViewZoomtofit2
Part.ViewZoomtofit2
End Sub
I need to make this change to about 3 squillion drawings and sure could use some help!
Thank you.
SolidworksDrawings And Detailing