'! -_RunScript '( Option Explicit Call PrintPx() Sub PrintPx() Dim strView, sFactor, arrViewSize, arrRect, strObjects, dblDistanceX, dblDistanceY, arrLResult strObjects = Rhino.GetObjects("Select objects for scale print", 0,, False, True) If Not IsNull(strObjects) Then arrRect = Rhino.BoundingBox(strObjects) sFactor = Rhino.GetInteger("Change Scale Factor, default", 200, 1) 'Change default Scale Factor here If IsArray(arrRect) Then dblDistanceX = Rhino.Distance(arrRect(0), arrRect(1)) dblDistanceY = Rhino.Distance(arrRect(0), arrRect(3)) arrViewSize = Rhino.ViewSize If IsArray(arrViewSize) Then If Not IsNull(dblDistanceX And dblDistanceY) Then Rhino.Command("-_ViewportProperties _S " & Rhino.Floor(dblDistanceX) & " " & Rhino.Floor(dblDistanceY) & " _Enter") arrLResult = Rhino.LastCommandResult If (arrLResult = 0) Or (arrLResult = 2) Then strView = Rhino.CurrentView Rhino.ZoomSelected strView Rhino.Command "_SelNone" Rhino.Command("-_ViewCaptureToFile _W=" & dblDistanceX & " _H=" & dblDistanceY & " _S=" & sFactor & " _L=No _B") ' Here Paramater for Export arrLResult = Rhino.LastCommandResult If arrLResult = 0 Then Rhino.Command("-_ViewportProperties _S " & arrViewSize(0) & " " & arrViewSize(1) & " _Enter") Rhino.ZoomExtents strView Else Rhino.Command("-_ViewportProperties _S " & arrViewSize(0) & " " & arrViewSize(1) & " _Enter") Rhino.ZoomExtents strView End If End If End If End If End If End If End Sub ')