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-solidwo ... t-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-ap ... et-format/
https://help.solidworks.com/2022/Englis ... direct=1
Replace sheet format
- charlesculp
- Posts: 13
- Joined: Fri Mar 26, 2021 3:52 pm
- x 1
- x 13
Re: Replace sheet format
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.
Code: Select all
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