Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
' ******************************************************************************
' chgfmt.swb - macro recorded on 08/11/08 by mdenardo
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Dim MyDir As String
Dim MySheet As String
Dim MyFile As String
Sub main()
Set swApp = Application.SldWorks
MyDir = InputBox("Enter the path that contains the files you want to change.")
MySheet = InputBox("Enter the full path, including file name and extension of the sheet format you want to use.")
MyFile = Dir(MyDir & "\*.slddrw")
Do While MyFile <> ""
MyFile = Dir()
FileName = Split(MyFile, ".")
Set Part = swApp.OpenDoc6(MyDir & "\" & MyFile, 3, 0, "", longstatus, longwarnings)
swApp.OpenDoc6 MyDir & "\" & MyFile, 3, 0, "", longstatus, longwarnings
Set Part = swApp.ActivateDoc2(FileName(0) & " - Sheet1", False, longstatus)
swApp.ActiveDoc.ActiveView.FrameLeft = 0
swApp.ActiveDoc.ActiveView.FrameTop = 0
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
boolstatus = Part.Extension.SelectByID2("Sheet1", "SHEET", 0.1391084233669, 0.2266029916164, 0, False, 0, Nothing, 0)
Part.ClearSelection2 True
Part.SetupSheet4 "Sheet1", 12, 12, 1, 1, False, MySheet, 0.4318, 0.2794, "Default" ', True
Part.ViewZoomtofit2
retval1 = Part.Save3()
Set Part = Nothing
swApp.CloseDoc FileName(0) & " - Sheet1"
Loop
End Sub