Example 9 - scale1.swb

' ***************************************************************
' SCALE1.swb
'
' This macro will resize your part file to show it somewhat
' *to scale* on your screen.
' 
' Macro written by Joe Jones   joe@nhcad.com
' NEW HAMPSHIRE CAD   www.nhcad.com
' 
' You may have to edit the value of Scale2 to fit your specific
' monitor and resolution.  Its just a trial and error process to
' narrow it down.
' ***************************************************************

Dim swApp As Object
Dim modelDoc As Object
Dim modelView As Object

Sub main()
	Set swApp = CreateObject ("SldWorks.Application")
	Set modelDoc = swApp.ActiveDoc
	Set modelView = modelDoc.activeView

	modelView.Scale2 = 0.95
	modelDoc.graphicsRedraw2
End Sub