AnsweredAssumed Answered

How to reload sheet format?

Question asked by Yong Ning on Jul 16, 2015
Latest reply on Jul 16, 2015 by Deepak Gupta

Reload. If you make changes to the Sheet Format, click to return to the default format.

0.jpg

 

 

Sheet Format/Size

Standard sheet size. Select a standard sheet size, or click Browse and locate a custom sheet format file.

Reload. If you make changes to the Sheet Format, click to return to the default format.

Display sheet format. Display border, title block, and so on.

 

**********************************

 

Why use SetTemplateName or SetupSheet4 don't reload the Sheet Format?

 

               tmpPlateName = oRng

               SwSheet.SetTemplateName tmpPlateName

               SwDraw.SetupSheet4 SwSheet.GetName, 12, 12, 1, oScale, True, tmpPlateName, 0.42, 0.297, "Default" ', True

 

*****************************************

Private Sub del()

   Dim Xls As Excel.Application, Rng As Range

       Set Xls = GetObject(, "Excel.Application")

       Set Rng = Xls.Selection

   Dim PathName

       PathName = Xls.ActiveWorkbook.Path & "\" & Rng

       Stop

   Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

       Set SwApp = Application.SldWorks

       Set SwModel = SwApp.ActiveDoc

   Dim SwSheet As Sheet

        Set swDraw = SwModel

        Set SwSheet = swDraw.GetCurrentSheet

        vSheetProps = SwSheet.GetProperties

        SwModel.SetupSheet5 SwSheet.GetName, swDwgPapersUserDefined, swDwgTemplateCustom, _

               vSheetProps(2), vSheetProps(3), False, PathName, 0.42, 0.297, "Default", True

        swDraw.ForceRebuild3 False

End Sub

Outcomes