Replace sheet format

I need to replace the sheet format on a bunch of part drawings. I searched about best ways to do this and found a neat method using design checker as seen in this link:

https://www.cati.com/blog/using-solidworks-design-checker-to-change-sheet-formats/

However when I do this, it loads the new sheet format buts unchecks the “Display sheet format” checkbox in the sheet properties dialog box. This creates an extra step.

I then thought I could try the macro route and tried recording my own as well as implementing a few different ones found online with the same result.

Could something be wrong with my sheet format since the same behavior happens with either method?


I think that the macro route could work using the SheetFormatVisible Property but I haven’t had success getting it to work in the codestack macro below. Any help would be greatly appreciated.

https://www.codestack.net/solidworks-api/document/drawing/replace-sheet-format/
https://help.solidworks.com/2022/English/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.ISheet~SheetFormatVisible.html?verRedirect=1

A bit late on this one, but I had the same issue and stumbled upon this. The command you are looking for is “SheetFormatVisible = True” which needs to be assigned to the current sheet.

Option Explicit

Dim swApp As SldWorks.SldWorks
Dim swDraw As SldWorks.DrawingDoc
Dim currentsheet As SldWorks.Sheet
Dim Part As SldWorks.ModelDoc2

Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set swDraw = Part

Set currentsheet = swDraw.GetCurrentSheet
currentsheet.SheetFormatVisible = True

End