DoubLines Document Settings 

Declaration:

PROCEDURE   DoubLines
( doubleLineDistance:REAL ) ;

Description:

Procedure DoubLines sets the line spacing width for double-line tools.

Parameters:

doubleLineDistance Width between lines.

Example:

DoubLines(1/2");



  DrwSize Document Settings 

Declaration:

PROCEDURE   DrwSize
(   rows :INTEGER;
    columns :INTEGER
) ;

Description:

Procedure DrwSize sets the drawing area of the document.

Parameters:

rows Number of sheet rows comprising total document area.
columns Number of sheet columns comprising total document area.

Example:

DrwSize(2,3);
{sets the drawing size to 2 x 3 sheets}



  GetDefaultTextSize Document Settings 

Declaration:

FUNCTION   GetDefaultTextSize
:REAL ;

Description:

Function GetDefaultTextSize returns the default text size in points.

72 points are equal to one(1) inch.



  GetDrawingSizeRect Document Settings 

Declaration:

PROCEDURE   GetDrawingSizeRect
( VAR  p1X :REAL;
  VAR  p1Y :REAL;
  VAR  p2X :REAL;
  VAR  p2Y :REAL
) ;

Description:

Returns the top left and bottom right coordinates of a rectangle surrounding the entire area of the document containing objects.

Parameters:

p1 Returns top left coordinate of drawing rectangle.
p2 Returns bottom right coordinate of drawing rectangle.



  GetFName Document Settings 

Declaration:

FUNCTION   GetFName
:STRING ;

Description:

Function GetFName returns the current file name of the active document.




  GetOrigin Document Settings 

Declaration:

PROCEDURE   GetOrigin
( VAR  x :REAL;
  VAR  y :REAL
) ;

Description:

Procedure GetOrigin returns the current origin location relative to the center of the page.

Parameters:

x Returns X coordinate of origin.
y Returns Y coordinate of origin.

Example:

GetOrigin(OriginX,OriginY);



  GetPref Document Settings 

Declaration:

FUNCTION   GetPref
( prefIndex:INTEGER ) :BOOLEAN ;

Description:

Function GetPref returns the on-off status of the specified preference item.

A table of preference dialog items and their corresponding IDs may be found in the

VectorScript Appendix.

Parameters:

prefIndex Preference item constant.

Example:

SelHandleStatus:=GetPref(17);



  GetPrefInt Document Settings 

Declaration:

FUNCTION   GetPrefInt
( prefIndex:INTEGER ) :INTEGER ;

Description:

Function GetPrefInt returns the value of a numeric VectorWorks preference setting.

A table of preference dialog items and their corresponding IDs may be found in the

VectorScript Appendix.

Parameters:

prefIndex Preference item constant.

Result:

The status of the requested preference. If the preference is a checkbox, then GetPrefInt returns TRUE or false. If it is a radio group or editable text item, then GetPrefInt returns an integer value representing that setting.

Example:

maxUndos:=GetPrefInt(17);



  GridLines Document Settings 

Declaration:

PROCEDURE   GridLines
( gridDistance:REAL ) ;

Description:

Procedure GridLines sets the distance between the drawing grid lines in the document.

Parameters:

gridDistance Grid spacing distance.

Example:





  PenGrid Document Settings 

Declaration:

PROCEDURE   PenGrid
( gridDistance:REAL ) ;

Description:

Procedure PenGrid sets the snap grid distance in the document.

Parameters:

gridDistance Pen grid spacing.



  SetConstrain Document Settings 

Declaration:

PROCEDURE   SetConstrain
( str:STRING ) ;

Description:

Procedure SetConstrain sets the active drawing constraints for the document. Each constraint is represented by an ASCII character identifier; these characters are assembled into a string which determines the constraints to be activated.

VectorWorks Constraint Identifiers

Constraint Identifier
Snap To Grid A
Snap To Objects Q
Constrain Angle S
Snap Intersection W
Smart Points D
Snap To Distance E
Smart Edge F
Constrain Tangent R



Parameters:

str Constraint constant string.

Example:

SetConstrain('QD');

{activates the snap objects and smart point constraints}



  SetDimStd Document Settings 

Declaration:

PROCEDURE   SetDimStd
( whichStandard:INTEGER ) ;

Description:

Procedure SetDimStd changes the default dimension standard of a VectorWorks document.

Built-in dimension standards are specified using index values of 1 thru 9, corresponding to the dimension standard preference menu. Custom dimensions are specified using indexes 0 thru -8, with 0 being the first custom dimension standard, -1 being the second, and so on.

Parameters:

whichStandard Dimension standard constant.

Example:

SetDimStd(2);

{sets the dimension standard to ASME}



  SetOrigin Document Settings 

Declaration:

PROCEDURE   SetOrigin
(   x :REAL;
    y :REAL
) ;

Description:

Procedure SetOrigin sets the position of the document origin. Parameters x and y specify specify X and Y offsets from the current origin location, rather than actual coordinate values.

Parameters:

x X offset value.
y Y offset value.



  SetOriginAbsolute Document Settings 

Declaration:

PROCEDURE   SetOriginAbsolute
(   xValue :REAL;
    yValue :REAL
) ;

Description:

Procedure SetOriginAbsolute sets the position of the origin relative to the center of the document drawing space.

Parameters:

xValue X coordinate of origin.
yValue Y coordinate of origin.



  SetPref Document Settings 

Declaration:

PROCEDURE   SetPref
(   index :INTEGER;
    status :BOOLEAN
) ;

Description:

Procedure SetPref sets the on-off status of a VectorWorks preference dialog item. Parameter index specifies the preference item, and parameter status sets the on-off status of the item.

A table of preference dialog items and their corresponding IDs may be found in the

VectorScript Appendix.

Parameters:

index Preference item constant.
status On- off status of preference.

Example:

SetPref(17,FALSE);



  SetPrefInt Document Settings 

Declaration:

PROCEDURE   SetPrefInt
(   index :INTEGER;
    value :INTEGER
) ;

Description:

Function SetPrefInt sets the value of a numeric VectorWorks preference setting.

A table of preference dialog items and their corresponding IDs may be found in the

VectorScript Appendix.

Parameters:

index Preference item constant.
value New value for preference.

Example:

SetPrefInt(17,FALSE);



  SetPrimaryDim Document Settings 

Declaration:

PROCEDURE   SetPrimaryDim
(   h :HANDLE;
    showValue :BOOLEAN;
    boxText :BOOLEAN;
    leader :STRING;
    trailer :STRING;
    precision :LONGINT
) ;

Description:

Procedure SetPrimaryDim sets the primary dimension options for single and dual dimensions.

Parameters:

h Handle to dimension.
showValue Display dimension value flag.
boxText Display box around dimension text flag.
leader Leader string.
trailer Trailer string.
precision Precision setting for displayed dimension value.

Example:

SetPrimaryDim(dimHd,TRUE,FALSE,'Approx.','',64);



  SetSecondaryDim Document Settings 

Declaration:

PROCEDURE   SetSecondaryDim
(   h :HANDLE;
    showValue :BOOLEAN;
    boxText :BOOLEAN;
    leader :STRING;
    trailer :STRING;
    precision :LONGINT
) ;

Description:

Procedure SetSecondaryDim sets the dimension options that are specific to the secondary portion of a dual dimension. This procedure can only be used for dual dimensions.

Parameters:

h Handle to dimension.
showValue Display dimension value flag.
boxText Display box around dimension text flag.
leader Leader string.
trailer Trailer string.
precision Precision setting for displayed dimension value.

Example:

SetSecondaryDim(dimHd,TRUE,FALSE,'Approx.','',64);



  SetUnits Document Settings 

Declaration:

PROCEDURE   SetUnits
(   fraction :LONGINT;
    display :LONGINT;
    format :INTEGER;
    upi :REAL;
    name :STRING;
    squareName :STRING
) ;

Description:

Procedure SetUnits sets low-level unit values in a VectorWorks document.

If only one of the units values is to be modified, GetUnits should be called first, and the values retrieved from that call should be passed back into SetUnits.

To specify a standard units setting with default values, use Units. To specify a standard units setting, but with some modified values, use PrimaryUnit.

VectorWorks Unit Formats

Units Format Format Flag
Decimal 0
Fractional 1
Decimal Feet and Inches 2
Fractional Feet and Inches 3

Parameters:

fraction Stored accuracy for the document.
display Minimum display accuracy for the document.
format Unit format style.
upi Units per inch.
name Unit label for displayed values
squareName Squared unit label for displayed values.

Example:

SetUnits(4096,64,3,1.0,'"','sq ft');



  Snap Document Settings 

Declaration:

PROCEDURE   Snap
(   gridSnap :BOOLEAN;
    objectSnap :BOOLEAN;
    locusSnap :BOOLEAN
) ;

Special Notes:

Snap is obsolete as of VectorWorks 8.0

Description:

Obsolete procedure.

Parameters:

gridSnap Snap to Grid constraint.
objectSnap Snap to Object constraint.
locusSnap Snap to Locus constraint.

See Also:

SetConstrain   SetPrefInt