CreateHLHandle View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   CreateHLHandle
VAR HLOptionsHandle:HANDLE ) ;

Python:

def  vs.CreateHLHandle():
   return HLOptionsHandle

Description:

Create a new Hidden Line Rendering options handle.



  CreateOpenGLHandle View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   CreateOpenGLHandle
VAR GLHandle:HANDLE ) ;

Python:

def  vs.CreateOpenGLHandle():
   return GLHandle

Description:

Return a new OpenGL options handle.



  CreateRenderworksStyle View / Zoom 
Vectorworks 2012

VectorScript Declaration:

FUNCTION   CreateRenderworksStyle
:HANDLE ;

Python:

def  vs.CreateRenderworksStyle():
   return HANDLE



  CreateRWHandle View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   CreateRWHandle
VAR RWHandle:HANDLE ) ;

Python:

def  vs.CreateRWHandle():
   return RWHandle

Description:

Create a new RenderWorks options handle.



  EditOpenGLPrefs View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   EditOpenGLPrefs
VAR updateRendering:BOOLEAN ) ;

Python:

def  vs.EditOpenGLPrefs():
   return updateRendering

Description:

Allows the user to edit OpenGL renderer preferences and stores them in the current drawing.



  EditRenderWorksPrefs View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   EditRenderWorksPrefs
VAR updateRendering:BOOLEAN ) ;

Python:

def  vs.EditRenderWorksPrefs():
   return updateRendering

Description:

Allows the user to edit RenderWorks renderer preferences and stores them in the current drawing.



  GetProjection View / Zoom 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   GetProjection
( theyLayer:HANDLE ) :INTEGER ;

Python:

def  vs.GetProjection(theyLayer):
   return INTEGER

Description:

Returns the projection index from the specified layer.

Parameters:

theyLayer Layer which the projection is returned for.



  GetVCenter View / Zoom 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   GetVCenter
( VAR  centerX :REAL;
  VAR  centerY :REAL
) ;

Python:

def  vs.GetVCenter():
   return center

Description:

Procedure GetVCenter returns the Vectorworks document coordinates at the center of the drawing window.

Parameters:

center Returns view center point.

Example:

PROCEDURE GetWindowSizeProc;
CONST
	kLeftPaletteMargin    = 54;
	kRightPaletteMargin   = 176;
	kScrollMargin         = 18;
	kTopDocumentMargin    = 48;
	kRulerMargin          = 16;
	kBottomDocumentMargin = 50;
VAR
	ViewCenterX, ViewCenterY       :REAL;
	ViewWidth, ViewHeight          :REAL;
	ScnX1, ScnY1, ScnX2, ScnY2     :REAL;
	ViewX1, ViewY1, ViewX2, ViewY2 :REAL;
	LayerScale                     :REAL;
	TopBottomMargin                :REAL;
	LeftRightMargin                :REAL;
BEGIN
	LayerScale := GetLScale(ActLayer);
	GetVCenter(ViewCenterX, ViewCenterY);
	GetScreen(ScnX1, ScnY1, ScnX2, ScnY2);
	TopBottomMargin := kTopDocumentMargin + kBottomDocumentMargin;
	LeftRightMargin := 0;
	IF GetPref(22) THEN begin {Left Palette Margin Turned On}
		LeftRightMargin := LeftRightMargin + kLeftPaletteMargin;
	END;
	IF GetPref(23) THEN begin {Right Palette Margin Turned On}
		LeftRightMargin := LeftRightMargin + kRightPaletteMargin;
	END;
	IF GetPref(6) THEN BEGIN {Show Rulers}
		TopBottomMargin := TopBottomMargin + kRulerMargin;
		LeftRightMargin := LeftRightMargin + kRulerMargin;
	END;
	IF GetPref(7) THEN BEGIN {Show Scroll Bars}
		TopBottomMargin := TopBottomMargin + kScrollMargin;
		LeftRightMargin := LeftRightMargin + kScrollMargin;
	END;
	ViewWidth  := (ScnX2 - LeftRightMargin) * LayerScale / (72 * GetZoom / 100);
	ViewHeight := (ScnY2 - TopBottomMargin) * LayerScale / (72 * GetZoom / 100);
	ViewX1 := ViewCenterX - (ViewWidth  / 2) {+ (LeftRightMargin / 2)};
	ViewX2 := ViewCenterX + (ViewWidth  / 2) {- (LeftRightMargin / 2)};
	ViewY1 := ViewCenterY + (ViewHeight / 2) {- (TopBottomMargin / 2)};
	ViewY2 := ViewCenterY - (ViewHeight / 2) {+ (TopBottomMargin / 2)};
	Rect(ViewX1, ViewY1, ViewX2, ViewY2);
END;
RUN(GetWindowSizeProc);



  GetView View / Zoom 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   GetView
( VAR  xAngleR :REAL;
  VAR  yAngelR :REAL;
  VAR  zAngleR :REAL;
  VAR  offsetX :REAL;
  VAR  offsetY :REAL;
  VAR  offsetZ :REAL
) ;

Python:

def  vs.GetView():
   return (xAngleR, yAngelR, zAngleR, offset)

Description:

Returns information about the current 3D view.

Parameters:

xAngleR Returns X rotation angle of view.
yAngelR Returns Y rotation angle of view.
zAngleR Returns Z rotation angle of view.
offset Center of view rotation.

Example:

PROCEDURE Example;
VAR
	xAngleR, yAngelR, zAngleR, offsetX, offsetY, offsetZ :REAL;
BEGIN
	GetView(xAngleR, yAngelR, zAngleR, offsetX, offsetY, offsetZ);
	Message(xAngleR, ' ', yAngelR, ' ', zAngleR, ' ', offsetX, ' ', offsetY, ' ', offsetZ);
END;
RUN(Example);



  GetZoom View / Zoom 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetZoom
:REAL ;

Python:

def  vs.GetZoom():
   return REAL

Description:

Function GetZoom returns the percentage of the zoom factor in the current document view.



  Projection View / Zoom 
MiniCAD4.0

VectorScript Declaration:

PROCEDURE   Projection
(   proj :INTEGER;
    rMode :INTEGER;
    viewDistance :REAL (Coordinate);
    clip1X :REAL;
    clip1Y :REAL;
    clip2X :REAL;
    clip2Y :REAL
) ;

Python:

def  vs.Projection(proj, rMode, viewDistance, clip1, clip2):
   return None

Description:

Procedure Projection sets the projection mode of a Vectorworks document.

Parameters viewDistance, clip1, and clip2 are used only in perspective projection mode.

Parameters:

proj Projection mode of document.
rMode Render mode of document.
viewDistance View length.
clip1 Top left coordinate of clipping rectangle.
clip2 Bottom right coordinate of clipping rectangle.

Example:

Projection(1,2,3',-2,-2,2,2);



  RetrieveCustomRWPrefs View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   RetrieveCustomRWPrefs
( VAR  useTextures :BOOLEAN;
  VAR  useTransparency :BOOLEAN;
  VAR  useShadows :BOOLEAN;
  VAR  useRayTracing :BOOLEAN;
  VAR  useAntiAliasing :BOOLEAN;
  VAR  useDithering :BOOLEAN;
  VAR  tessellationDetail :INTEGER;
  VAR  shadowStyle :INTEGER;
  VAR  rayTracingRecursion :INTEGER
) ;

Python:

def  vs.RetrieveCustomRWPrefs():
   return (useTextures, useTransparency, useShadows, useRayTracing, useAntiAliasing, useDithering, tessellationDetail, shadowStyle, rayTracingRecursion)

Description:

Retrieves the current custom RenderWorks rendering preferences from data stored in the current drawing.



  RetrieveHLPrefs View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   RetrieveHLPrefs
( VAR  smoothingAngle :REAL;
  VAR  lineStyle :INTEGER;
  VAR  shadeFactorIndex :INTEGER;
  VAR  doIntersections :BOOLEAN
) ;

Python:

def  vs.RetrieveHLPrefs():
   return (smoothingAngle, lineStyle, shadeFactorIndex, doIntersections)

Description:

Retrieves the current Hidden Line rendering preferences from data stored in the current drawing.



  RetrieveOpenGLPrefs View / Zoom 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   RetrieveOpenGLPrefs
( VAR  useTextures :BOOLEAN;
  VAR  tessellationDetail :INTEGER;
  VAR  useNURBS :BOOLEAN
) ;

Python:

def  vs.RetrieveOpenGLPrefs():
   return (useTextures, tessellationDetail, useNURBS)

Description:

Retrieves the current OpenGL rendering preferences from data stored in the current drawing.



  SaveSheet View / Zoom 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SaveSheet
(   name :STRING;
    saveView :BOOLEAN;
    saveClass :BOOLEAN;
    saveLayer :BOOLEAN
) ;

Python:

def  vs.SaveSheet(name, saveView, saveClass, saveLayer):
   return None

Description:

Procedure SaveSheet saves current view, page, class, and layer settings in a new sheet with a specified name. The saveView, saveClass and saveLayer parameters can be used to selectively not save an aspect of the view. Also after the sheet is created, the SetObjectVariableBoolean function can be used to control whether to utilize the view, page, class or layer settings.

Parameters:

name Name of saved sheet.
saveView Saves view settings.
saveClass Saves class settings.
saveLayer Saves layer settings.

Example:

PROCEDURE Example;
VAR
	savedViewHandle  :HANDLE;
	ovSheetSaveView	  :BOOLEAN;
	ovSheetSavePage	  :BOOLEAN;
	ovSheetSaveClass :BOOLEAN;
	ovSheetSaveLayer :BOOLEAN;
BEGIN
	savedViewHandle := GetObject('Untitled View');
	IF savedViewHandle <> NIL THEN BEGIN
		ovSheetSaveView  := GetObjectVariableBoolean(savedViewHandle, 450);
		ovSheetSavePage  := GetObjectVariableBoolean(savedViewHandle, 451);
		ovSheetSaveClass := GetObjectVariableBoolean(savedViewHandle, 452);
		ovSheetSaveLayer := GetObjectVariableBoolean(savedViewHandle, 453);
		AlrtDialog(Concat(
			'handle type: ', GetType(savedViewHandle), Chr(13),
			'save view: ',  ovSheetSaveView,  Chr(13),
			'save page: ',  ovSheetSavePage,  Chr(13),
			'save class: ', ovSheetSaveClass, Chr(13),
			'save layer: ', ovSheetSaveLayer));
	END;
END;
RUN(Example);



  SetVCenter View / Zoom 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   SetVCenter
(   viewCenterX :REAL;
    viewCenterY :REAL
) ;

Python:

def  vs.SetVCenter(viewCenter):
   return None

Description:

Procedure SetVCenter sets the Vectorworks document view center.

Parameters:

viewCenter Coordinates of document view center.

Example:

SetVCenter(2,4);



  SetView View / Zoom 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetView
(   xAngle :REAL;
    yAngle :REAL;
    zAngle :REAL;
    xDistance :REAL (Coordinate);
    yDistance :REAL (Coordinate);
    zDistance :REAL (Coordinate)
) ;

Python:

def  vs.SetView(xAngle, yAngle, zAngle, xDistance, yDistance, zDistance):
   return None

Description:

Procedure SetView sets the view of a Vectorworks document. The projection must be non-plan to modify the view.

Parameters:

xAngle X axis rotation angle.
yAngle Y axis rotation angle.
zAngle Z axis rotation angle.
xDistance X coordinate of view center.
yDistance Y coordinate of view center.
zDistance Z coordinate of view center.

Example:

SetView(45d,30d,30d,0,2,2);



  SetViewVector View / Zoom 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   SetViewVector
(   locationX :REAL;
    locationY :REAL;
    locationZ :REAL;
    targetX :REAL;
    targetY :REAL;
    targetZ :REAL;
    upX :REAL;
    upY :REAL;
    upZ :REAL
) ;

Python:

def  vs.SetViewVector(location, target, up):
   return None

Description:

Sets the view direction of the active document.

Parameters:

location 3D coordinate of view origin.
target 3D coordinate of view target.
up 3D coordinate indicating camera up direction.



  SetZoom View / Zoom 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   SetZoom
( zoomfactor:LONGINT ) ;

Python:

def  vs.SetZoom(zoomfactor):
   return None

Description:

Procedure SetZoom sets the zoom factor of the active Vectorworks document.

Parameters:

zoomfactor Zoom percentage setting.



  VDelete View / Zoom 
MiniCAD

VectorScript Declaration:

PROCEDURE   VDelete
( name:STRING ) ;

Python:

def  vs.VDelete(name):
   return None

Description:

Procedure VDelete deletes the specified saved view.

Parameters:

name Name of view to be deleted.

Example:

VDelete('Detail A-A');



  VRestore View / Zoom 
MiniCAD

VectorScript Declaration:

PROCEDURE   VRestore
( name:STRING ) ;

Python:

def  vs.VRestore(name):
   return None

Description:

Procedure VRestore restores the specified saved view (i.e., sheet name).

Parameters:

name Name of view to be displayed.



  VSave View / Zoom 
MiniCAD

VectorScript Declaration:

PROCEDURE   VSave
( name:STRING ) ;

Python:

def  vs.VSave(name):
   return None

Description:

Procedure VSave saves the current Vectorworks document view.

Parameters:

name Name of view to save.