AddTileGeometryObject Document Attributes 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   AddTileGeometryObject
(   tileHandle :HANDLE;
    objectHandle :HANDLE
) :BOOLEAN ;

Python:

def  vs.AddTileGeometryObject(tileHandle, objectHandle):
   return BOOLEAN

Description:

Adds the specified object to the specified tile resource.

Parameters:

tileHandle The handle to the tile resource.
objectHandle The handle to the object to add.

Result:

TRUE if a valid object was successfully added; FALSE otherwise.

Example:

return := AddTileGeometryGroup(tileHandle, objectHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  CreateImageFromPaint Document Attributes 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   CreateImageFromPaint
(   paint :HANDLE;
    imageName :STRING
) :HANDLE ;

Python:

def  vs.CreateImageFromPaint(paint, imageName):
   return HANDLE

Description:

Creates an image resource from a paint node.

Parameters:

paint Handle to the paint node to be used to create the image resource.
imageName User-specified name to be used to identify the newly created image resource.

Result:

Returns the handle to the newly create image resource if successful; nil otherwise.

Example:

imageHandle := CreateImageFromPaint(paintHandle, 'My Image');



  CreateTile Document Attributes 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   CreateTile
( tileName:STRING ) :HANDLE ;

Python:

def  vs.CreateTile(tileName):
   return HANDLE

Description:

Creates a new tile resource.

Parameters:

tileName A user-specified name by which the newly created tile will be identified.

Result:

Returns a handle to a new tile resource if successful, otherwise the function returns nil.

Example:

tileHandle := CreateTile('My Tile');

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  DS_GetAngle Document Attributes 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   DS_GetAngle
:REAL ;

Python:

def  vs.DS_GetAngle():
   return REAL

Description:

Returns document shadow angle.



  DS_GetFillStyle Document Attributes 
Vectorworks 2014

VectorScript Declaration:

PROCEDURE   DS_GetFillStyle
( VAR  shadowFillStyle :INTEGER;
  VAR  shadowFillName :STRING;
  VAR  solidColorRef :LONGINT
) ;

Python:

def  vs.DS_GetFillStyle():
   return (shadowFillStyle, shadowFillName, solidColorRef)

Description:

Returns document shadow fill style, fill name or color index.



  DS_GetOffset Document Attributes 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   DS_GetOffset
:REAL ;

Python:

def  vs.DS_GetOffset():
   return REAL

Description:

Returns document shadow offset.



  DS_GetOffsetUnit Document Attributes 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   DS_GetOffsetUnit
:INTEGER ;

Python:

def  vs.DS_GetOffsetUnit():
   return INTEGER

Description:

Returns document shadow offset unit.



  DS_GetOpacity Document Attributes 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   DS_GetOpacity
:LONGINT ;

Python:

def  vs.DS_GetOpacity():
   return LONGINT

Description:

Returns document shadow opacity.



  DS_IsOpacityByClass Document Attributes 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   DS_IsOpacityByClass
:BOOLEAN ;

Python:

def  vs.DS_IsOpacityByClass():
   return BOOLEAN

Description:

Returns whether document shadow opacity is by class.



  FFillBack Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   FFillBack
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.FFillBack():
   return (red, green, blue)

Description:

Procedure FFillBack returns the current fill background color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

FFillBack(redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FFillColorByClass Document Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   FFillColorByClass
:BOOLEAN ;

Python:

def  vs.FFillColorByClass():
   return BOOLEAN

Description:

Function FFillColorByClass returns whether the global attributes are set to use the fill colors of the default class.

Example:

useClassFillCol:=FFillColorByClass;



  FFillFore Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   FFillFore
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.FFillFore():
   return (red, green, blue)

Description:

Procedure FFillFore returns the current fill foreground color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

FFillFore(redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FFillPat Document Attributes 
MiniCAD

VectorScript Declaration:

FUNCTION   FFillPat
:LONGINT ;

Python:

def  vs.FFillPat():
   return LONGINT

Description:

Function FFillPat returns the current fill pattern setting.

Fill patterns and their associated constants can be found in the VectorScript Appendix.

Example:

currFillStyle:=FFillPat;



  FFPatByClass Document Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   FFPatByClass
:BOOLEAN ;

Python:

def  vs.FFPatByClass():
   return BOOLEAN

Description:

Function FFPatByClass returns whether the global attributes are set to use the fill pattern of the default class.

Example:

useClassFPat:=FFPatByClass;



  FillBack Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   FillBack
(   colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.FillBack(color):
   return None

Description:

Procedure FillBack sets the active fill background color setting for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to set as active fill background color.

Example:

FillBack(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FillFore Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   FillFore
(   colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.FillFore(color):
   return None

Description:

Procedure FillFore sets the active fill foreground color setting for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to set as active fill foreground color.

Example:

FillFore(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FillPat Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   FillPat
( patNumber:LONGINT ) ;

Python:

def  vs.FillPat(patNumber):
   return None

Description:

Procedure FillPat sets the active fill pattern for the document. Any objects created after a calling this procedure will use the specified fill pattern.

Fill patterns and their associated constants can be found in the VectorScript Appendix.

Parameters:

patNumber Index of fill pattern to be set as document default.

Example:

Rect(0,0,2,2);
FillPat(21);
Rect(2,2,4,4);



  FLSByClass Document Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   FLSByClass
:BOOLEAN ;

Python:

def  vs.FLSByClass():
   return BOOLEAN

Description:

Function FLSByClass returns whether the global attributes are set to use the line style of the default class.

Example:

useClassLStyle:=FLSByClass;



  FLWByClass Document Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   FLWByClass
:BOOLEAN ;

Python:

def  vs.FLWByClass():
   return BOOLEAN

Description:

Function FLWByClass returns whether the global attributes are set to use the line weight of the default class.

Example:

useClassLWidth:=FLWByClass;



  FMarker Document Attributes 
MiniCAD6.0 - obsolete as of VectorWorks 2008

VectorScript Declaration:

PROCEDURE   FMarker
( VAR  style :INTEGER;
  VAR  size :REAL;
  VAR  ang :INTEGER
) ;

Python:

def  vs.FMarker():
   return (style, size, ang)

Special Notes:

FMarker is obsolete as of VectorWorks 2008

Description:

Procedure FMarker returns the active marker style parameters.

A complete listing of marker styles can be found in the Appendix

Parameters:

style Returns marker style.
size Returns marker size in inches measured in page space.
ang Returns marker angle (in degrees).

Example:

PROCEDURE Example;
VAR
	style :INTEGER;
	size  :REAL;
	ang   :INTEGER;
BEGIN
	FMarker(style, size, ang);
	Message(style, ' ', size, ' ', ang);
END;
RUN(Example);




  FMarkerByClass Document Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   FMarkerByClass
:BOOLEAN ;

Python:

def  vs.FMarkerByClass():
   return BOOLEAN

Description:

Function FMarkerByClass returns whether the global attributes are set to use the arrow style of the default class.

Example:

useClassMarker:=FMarkerByClass;



  FPenBack Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   FPenBack
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.FPenBack():
   return (red, green, blue)

Description:

Procedure FPenBack returns the current pen background color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FPenColorByClass Document Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   FPenColorByClass
:BOOLEAN ;

Python:

def  vs.FPenColorByClass():
   return BOOLEAN

Description:

Function FPenColorByClass returns whether the global attributes are set to use the pen colors of the default class.

Example:

useClassPenColor:=FPenColorByClass;



  FPenFore Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   FPenFore
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.FPenFore():
   return (red, green, blue)

Description:

Procedure FPenFore returns the current pen foreground color of the document. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FPenPat Document Attributes 
MiniCAD - obsolete as of Vectorworks 2013

VectorScript Declaration:

FUNCTION   FPenPat
:INTEGER ;

Python:

def  vs.FPenPat():
   return INTEGER

Special Notes:

FPenPat is obsolete as of Vectorworks 2013

Description:

Function FPenPat returns the active pen pattern setting.

Example:

CurrPenStyle:=FPenPat;



  FPenPatN Document Attributes 
Vectorworks 2013

VectorScript Declaration:

FUNCTION   FPenPatN
:LONGINT ;

Python:

def  vs.FPenPatN():
   return LONGINT

Description:

Function FPenPatN returns the active pen pattern setting.

See Also:

PenPatN  



  FPenSize Document Attributes 
MiniCAD

VectorScript Declaration:

FUNCTION   FPenSize
:INTEGER ;

Python:

def  vs.FPenSize():
   return INTEGER

Description:

Function FPenSize returns the active pen size setting (in mils).

Example:

CurrPenSize:=FPenSize;



  GetDashDataValPairAt Document Attributes 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   GetDashDataValPairAt
(   dashStyleIndex :INTEGER;
    dataIndex :INTEGER;
  VAR  dash :REAL;
  VAR  gap :REAL
) :BOOLEAN ;

Python:

def  vs.GetDashDataValPairAt(dashStyleIndex, dataIndex):
   return (BOOLEAN, dash, gap)

Description:

Function GetDashDataValPairAt gets the dash data for the specified dash style. The dash data is a dash/gap value pair. GetDashDataValPairAt returns false if the dash style or dash data doesn't exist. Dash styles support up to 5 dash/gap value pairs.

Parameters:

dashStyleIndex The dash style index.
dataIndex Index fo the data value pair.
dash The dash segement value.
gap The gap segment value.

Example:

PROCEDURE Example;
VAR
n, numPairs, dashIndex : INTEGER;
scaleWThick  :BOOLEAN;
arrayDashDat : ARRAY[1..5] OF POINT;
x,y : REAL;

BEGIN

dashIndex := GetDashStyleIndex(TRUE, 2, 0.12, 0.18, 0.03, 0.07);

numPairs := GetNumDashDataPairs(dashIndex,scaleWThick);

FOR n := 1 TO numPairs DO BEGIN
 IF (GetDashDataValPairAt(dashIndex, n , x, y)) THEN BEGIN
   arrayDashDat[n].x := x ;
   arrayDashDat[n].y := y ;
 END; 
END;

END;
RUN(Example);

See Also:

GetNumDashDataPairs   GetDashStyleIndex  



  GetDashStyle Document Attributes 
MiniCAD5.0

VectorScript Declaration:

FUNCTION   GetDashStyle
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) :INTEGER ;

Python:

def  vs.GetDashStyle(swt, numPairs, pair1, pair2, pair3, pair4, pair5):
   return INTEGER

Description:

Function GetDashStyle searches for the pattern specified by the parameters. If it exists, then the linestyle index associated with the existing dash pattern is returned. If it does not exist, then it is added to the document and the linestyle index associated with the new dash pattern is returned.

Example:

currLS:=GetDashStyle;



  GetDashStyleIndex Document Attributes 
Vectorworks 2010

VectorScript Declaration:

FUNCTION   GetDashStyleIndex
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) :INTEGER ;

Python:

def  vs.GetDashStyleIndex(swt, numPairs, pair1, pair2, pair3, pair4, pair5):
   return INTEGER

Description:

Function GetDashStyleIndex searches for the pattern specified by the parameters. If it exists, then the linestyle index associated with the existing dash pattern is returned. If it does not exist, then it is added to the document and the linestyle index associated with the new dash pattern is returned.

Example:

GetDashStyleIndex(TRUE, 2, 0.12, 0.18, 0.03, 0.07);

GetDashStyleIndex(TRUE, 3, 0.12, 0.18, 0.03, 0.07, 0.2, 0.05);

See Also:

GetDashDataValPairAt   GetNumDashDataPairs  



  GetDefaultBeginningMarker Document Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   GetDefaultBeginningMarker
( VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL;
  VAR  visibility :BOOLEAN
) :BOOLEAN ;

Python:

def  vs.GetDefaultBeginningMarker():
   return (BOOLEAN, style, angle, size, width, thicknessBasis, thickness, visibility)

Description:

Gets all properties for the document default beginning marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	visibility: BOOLEAN;

	
BEGIN
ok := GetDefaultBeginningMarker (style, angle, size, width, thickBasis, thickness, visibility);
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);	
END;

RUN(Example);

See Also:

GetDefaultEndMarker  



  GetDefaultEndMarker Document Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   GetDefaultEndMarker
( VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL;
  VAR  visibility :BOOLEAN
) :BOOLEAN ;

Python:

def  vs.GetDefaultEndMarker():
   return (BOOLEAN, style, angle, size, width, thicknessBasis, thickness, visibility)

Description:

Gets all properties for the document default end marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	visibility: BOOLEAN;

	
BEGIN
ok := GetDefaultEndMarker (style, angle, size, width, thickBasis, thickness, visibility);
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);	
END;

RUN(Example);

See Also:

GetDefaultBeginningMarker  



  GetDefaultOpacity Document Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   GetDefaultOpacity
VAR opacity:INTEGER ) ;

Python:

def  vs.GetDefaultOpacity():
   return opacity

Description:

Returns the default opacity.



  GetDocumentDefaultSketchStyle Document Attributes 
VectorWorks11.5

VectorScript Declaration:

FUNCTION   GetDocumentDefaultSketchStyle
:STRING ;

Python:

def  vs.GetDocumentDefaultSketchStyle():
   return STRING

Description:

Returns the document default sketch style. Returns the string 'No Sketch' if the current sketch style is 'No Sketch'.



  GetGradientData Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetGradientData
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  spotPosition :REAL;
  VAR  midpointPosition :REAL;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetGradientData(gradient, segmentIndex):
   return (spotPosition, midpointPosition, red, green, blue)

Description:

Gets the spot position, midpoint position and color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

PROCEDURE Example;
VAR
   gradient :HANDLE;
   segmentIndex :INTEGER;
   spotPosition, midpointPosition :REAL;
   red, green, blue :LONGINT;
BEGIN
   gradient := GetObject('Cyan-Magenta-Yellow');
   segmentIndex := 3;
   GetGradientData(gradient, segmentIndex, spotPosition, midpointPosition, red, green, blue);
   Message(red, ' ', green, ' ', blue);
END;
RUN(Example);



  GetGradientDataN Document Attributes 
Vectorworks 2015

VectorScript Declaration:

PROCEDURE   GetGradientDataN
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  spotPosition :REAL;
  VAR  midpointPosition :REAL;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT;
  VAR  opacity :INTEGER
) ;

Python:

def  vs.GetGradientDataN(gradient, segmentIndex):
   return (Boolean, spotPosition, midpointPosition, red, green, blue, opacity)

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
red Red component of the color spot's color.
green Green component of the color spot's color.
blue Blue component of the color spot's color.
opacity Opacity of the color spot.

Example:

PROCEDURE Example;
VAR
gradient :HANDLE;
segmentIndex :INTEGER;
spotPosition, midpointPosition :REAL;
red, green, blue :LONGINT;
opacity :INTEGER
BEGIN
gradient := GetObject('Cyan-Magenta-Yellow');
segmentIndex := 3;
GetGradientData(gradient, segmentIndex, spotPosition, midpointPosition, red, green, blue.opacity);
Message(red, ' ', green, ' ', blue, ' ', opacity);
END;
RUN(Example);

See Also:

SetGradientDataN   InsertGradientData  



  GetGradientMidpointPosition Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetGradientMidpointPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  position :REAL
) ;

Python:

def  vs.GetGradientMidpointPosition(gradient, segmentIndex):
   return position

Description:

Gets the midpoint position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
position Position of the segment's midpoint relatvie to color spot immediately to left.
(position >= 0.0 and position <= 1.0)

Example:

GetGradientMidpointPosition(gradientHandle, 4, midpointPosition);



  GetGradientOpacity Document Attributes 
Vectorworks 2015

VectorScript Declaration:

PROCEDURE   GetGradientOpacity
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  opacity :INTEGER
) ;

Python:

def  vs.GetGradientOpacity(gradient, segmentIndex):
   return opacity

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
opacity Opacity at the spot position.

Example:

GetGradientSpotColor(gradientHandle, 4, opacity);

See Also:

SetGradientOpacity  



  GetGradientSpotColor Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetGradientSpotColor
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetGradientSpotColor(gradient, segmentIndex):
   return (red, green, blue)

Description:

Gets the spot color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

GetGradientSpotColor(gradientHandle, 4, red, green, blue);



  GetGradientSpotPosition Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetGradientSpotPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  position :REAL
) ;

Python:

def  vs.GetGradientSpotPosition(gradient, segmentIndex):
   return position

Description:

Gets the spot position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
position Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)

Example:

GetGradientSpotPosition(gradientHandle, 4, spotPosition);



  GetNumDashDataPairs Document Attributes 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   GetNumDashDataPairs
(   dashIndex :INTEGER;
  VAR  swt :BOOLEAN
) :INTEGER ;

Python:

def  vs.GetNumDashDataPairs(dashIndex):
   return (INTEGER, swt)

Description:

Function GetNumDashDataPairs returns the number of dash/gap value pairs defined for the specified dash style. The "scale with thickness" setting is also returned. Dash styles support up to 5 dash/gap value pairs.

Parameters:

dashIndex The dash style index.
swt The "scale with thickness" setting.

Example:

PROCEDURE Example;
VAR
n, numPairs, dashIndex : INTEGER;
scaleWThick  :BOOLEAN;
arrayDashDat : ARRAY[1..5] OF POINT;
x,y : REAL;

BEGIN

dashIndex := GetDashStyleIndex(TRUE, 2, 0.12, 0.18, 0.03, 0.07);

numPairs := GetNumDashDataPairs(dashIndex,scaleWThick);

FOR n := 1 TO numPairs DO BEGIN
 IF (GetDashDataValPairAt(dashIndex, n , x, y)) THEN BEGIN
   arrayDashDat[n].x := x ;
   arrayDashDat[n].y := y ;
 END; 
END;

END;
RUN(Example);

See Also:

GetDashDataValPairAt   GetDashStyleIndex  



  GetNumGradientSegments Document Attributes 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   GetNumGradientSegments
( gradient:HANDLE ) :INTEGER ;

Python:

def  vs.GetNumGradientSegments(gradient):
   return INTEGER

Description:

Gets the number of segments in the gradient.

Parameters:

gradient The gradient from which to get the number of segments.

Result:

Returns the number of segments in the gradient if successful; 0 otherwise.

Example:

numSegments := GetNumGradientSegments(gradientHandle);



  GetTileBackgroundColor Document Attributes 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   GetTileBackgroundColor
(   tileHandle :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetTileBackgroundColor(tileHandle):
   return (red, green, blue)

Description:

Gets the specified tile resource's background color.

Parameters:

tileHandle The tile resource from which to get the background color.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

GetTileBackgroundColor(tileHandle, backgroundColor);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileGeometryGroup Document Attributes 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetTileGeometryGroup
( tileHandle:HANDLE ) :HANDLE ;

Python:

def  vs.GetTileGeometryGroup(tileHandle):
   return HANDLE

Description:

Gets the tile resource's geometry group.

Parameters:

tileHandle The handle to the tile from which to get the group.

Result:

A handle to the tile geometry group, if successful; nil otherwise.

Example:

tileGroupHandle := GetTileGeometryGroup(tileHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileGroupParent Document Attributes 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetTileGroupParent
( groupHandle:HANDLE ) :HANDLE ;

Python:

def  vs.GetTileGroupParent(groupHandle):
   return HANDLE

Description:

Gets the tile resource parent of the specified tile group.

Parameters:

groupHandle The group handle of which to get the tile resource parent.

Result:

The tile parent handle; nil otherwise.

Example:

tileHandle := GetTileGroupParent(groupHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileOffsetPoint Document Attributes 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   GetTileOffsetPoint
(   tileHandle :HANDLE;
  VAR  offsetPointX :REAL;
  VAR  offsetPointY :REAL
) ;

Python:

def  vs.GetTileOffsetPoint(tileHandle):
   return offsetPoint

Description:

Gets the specified tile resource's offset point.

Parameters:

tileHandle The tile resource from which to get the offset point.
offsetPoint The retrieved offset point.

Example:

GetTileOffsetPoint(tileHandle, offsetPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileRepetitionPoint Document Attributes 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   GetTileRepetitionPoint
(   tileHandle :HANDLE;
  VAR  repetitionPointX :REAL;
  VAR  repetitionPointY :REAL
) ;

Python:

def  vs.GetTileRepetitionPoint(tileHandle):
   return repetitionPoint

Description:

Gets the specified tile resource's repetition point.

Parameters:

tileHandle The tile resource from which to get the repetition point.
repetitionPoint The retrieved repetition point.

Example:

GetTileRepetitionPoint(tileHandle, repetitionPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  InsertGradientData Document Attributes 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   InsertGradientData
(   gradient :HANDLE;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT;
    opacity :INTEGER
) :INTEGER ;

Python:

def  vs.InsertGradientData(gradient, spotPosition, midpointPosition, red, green, blue, opacity):
   return INTEGER

Description:

A segment consists of a single color spot and the single midpoint immediately to the right of the color spot.

Parameters:

gradient Gradient into which a segment is to be inserted.
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
red Red component of the color spot's color.
green Green component of the color spot's color.
blue Blue component of the color spot's color.
opacity Opacity of the color spot.

Result:

Returns the index of the newly created segment; 0 otherwise.
Note: segment indexes begin with 1.

Example:

index := InsertGradientData(gradientHandle, 0.35, 0.4, 255, 255, 255, 100);
{ inserts a white color spot at position, 0.35, with a midpoint position of 0.4; 100 is max opacity (i.e. opaque) }

See Also:

GetGradientDataN   SetGradientDataN  



  InsertGradientSegment Document Attributes 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   InsertGradientSegment
(   gradient :HANDLE;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) :INTEGER ;

Python:

def  vs.InsertGradientSegment(gradient, spotPosition, midpointPosition, red, green, blue):
   return INTEGER

Description:

Inserts a new segment into the gradient and initializes its data to the specified values.

A segment consists of a single color spot and the single midpoint immediately to the right of the color spot.

Parameters:

gradient Gradient into which a segment is to be inserted.
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Result:

Returns the index of the newly created segment; 0 otherwise.

Note: segment indexes begin with 1.

Example:

index := InsertGradientSegment(gradientHandle, 0.35, 0.4, 255, 255, 255);
{ inserts a white color spot at position, 0.35, with a midpoint position of 0.4 }



  IsTileGroupContainedObject Document Attributes 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   IsTileGroupContainedObject
( objectHandle:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsTileGroupContainedObject(objectHandle):
   return BOOLEAN

Description:

Determines if the specified object is a tile group-contained object.

Parameters:

objectHandle The object handle to check.

Result:

TRUE if the object is a tile group-contained object; FALSE otherwise.

Example:

return := IsTileGroupContainedObject(objectHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  IsUserColor Document Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   IsUserColor
(   ColorIDX :INTEGER;
  VAR  ColorName :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.IsUserColor(ColorIDX):
   return (BOOLEAN, ColorName)

Description:

Returns True if the color is a user color.



  Marker Document Attributes 
MiniCAD6.0 - obsolete as of VectorWorks 2008

VectorScript Declaration:

PROCEDURE   Marker
(   style :INTEGER;
    size :REAL;
    ang :INTEGER
) ;

Python:

def  vs.Marker(style, size, ang):
   return None

Special Notes:

Marker is obsolete as of VectorWorks 2008

Description:

Marker defines a marker (arrowhead) style for the document. This marker style becomes the active style for the document.

A complete listing of marker styles can be found in the Appendix

Parameters:

style Marker style constant.
size Marker size in inches measured in page space. Legal values are 0.0 to 2.0.
ang Marker angle.

Example:

Marker(2,0.25,60);



  NumColors Document Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   NumColors
:INTEGER ;

Python:

def  vs.NumColors():
   return INTEGER

Description:

Returns the last used color index in the current document.



  NumDashStyles Document Attributes 
MiniCAD4.0

VectorScript Declaration:

FUNCTION   NumDashStyles
:INTEGER ;

Python:

def  vs.NumDashStyles():
   return INTEGER

Description:

Function NumDashStyles returns the number of available line dash patterns.

Example:

numLS:=NumDashStyles;



  Opacity Document Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   Opacity
( opacity:INTEGER ) ;

Python:

def  vs.Opacity(opacity):
   return None

Description:

Sets the active opacity.



  PenBack Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   PenBack
(   colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.PenBack(color):
   return None

Description:

Procedure PenBack set the active pen background color for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to be set as active pen background.

Example:

PenBack(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  PenFore Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   PenFore
(   colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.PenFore(color):
   return None

Description:

Procedure PenFore sets the active pen foreground color for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to be set as active pen foreground.

Example:

PenFore(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  PenPat Document Attributes 
MiniCAD - obsolete as of Vectorworks 2013

VectorScript Declaration:

PROCEDURE   PenPat
( patNumber:INTEGER ) ;

Python:

def  vs.PenPat(patNumber):
   return None

Special Notes:

PenPat is obsolete as of Vectorworks 2013

Description:

Procedure PenPat sets the active pen pattern (line style) for the document.

If patNumber is in the range 0 to 71 the linestyle will be set to the corresponding fill pattern. A value in the range -1 to -8, will set the linestyle to one of the defined Vectorworks linestyles.

Fill patterns and their associated constants can be found in the VectorScript Appendix.


Parameters:

patNumber Pattern/linestyle ID value.

Example:

PenPat(25);
{ uses fill pattern 25 as the active pen pattern }

PenPat(-3);
{ sets a linestyle as the active pen pattern }



  PenPatN Document Attributes 
Vectorworks 2013

VectorScript Declaration:

PROCEDURE   PenPatN
( patNumber:LONGINT ) ;

Python:

def  vs.PenPatN(patNumber):
   return None

Description:

Procedure PenPatN sets the active pen pattern (line style) for the document.

If patNumber is in the range 0 to 71 the linestyle will be set to the corresponding fill pattern. A negative value, will set the linestyle to the line type resource whose index is the negative of the value.

Parameters:

patNumber Pattern/linestyle ID value.

Example:

PenPat(25);
{ uses fill pattern 25 as the active pen pattern }

PenPat(-10);
{ sets the line type with the index of 10 as the active pen pattern }

See Also:

FPenPatN  



  PenSize Document Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   PenSize
( lw:INTEGER ) ;

Python:

def  vs.PenSize(lw):
   return None

Description:

Procedure PenSize sets the active line weight for the document.

Parameters:

lw Line weight (in mils). Fourteen (14) mils equals one pixel.

Example:

PenSize(28);



  RemoveGradientSegment Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   RemoveGradientSegment
(   gradient :HANDLE;
    segmentIndex :INTEGER
) ;

Python:

def  vs.RemoveGradientSegment(gradient, segmentIndex):
   return None

Description:

Removes the specified segment from the specified gradient.

Parameters:

gradient Gradient from which to remove a segment.
segmentIndex Index of segment to be removed.
(segment indexes begin with 1)

Example:

RemoveGradientSegment (gradientHandle, 4);
{ removes the segment with index 4 }



  SetDashStyle Document Attributes 
MiniCAD4.0

VectorScript Declaration:

PROCEDURE   SetDashStyle
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) ;

Python:

def  vs.SetDashStyle(swt, numPairs, pair1, pair2, pair3, pair4, pair5):
   return None

Description:

Procedure SetDashStyle creates a new linestyle in a Vectorworks document. Parameter swt defines whether the linestyle will be scaled with thickness, and parameter numPairs specifies the number of length pairs defining the linestyle.

The linestyle is defined by up to five black/white length pairs, which are specified in parameters b1,w1 through b5,w5. The minimum length of any given black or white parameter is 1 point, or 1/72 of an inch, and the line specification must be in pairs.

Example:

SetDashStyle(True,0,1",1/4",1/4",1/4");



  SetDashStyleN Document Attributes 
Vectorworks 2010

VectorScript Declaration:

PROCEDURE   SetDashStyleN
(   name :STRING;
    swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) ;

Python:

def  vs.SetDashStyleN(name, swt, numPairs, pair1, pair2, pair3, pair4, pair5):
   return None

Description:

Procedure SetDashStyleN creates a new linestyle in a Vectorworks document. Parameter name defines the name of the linestyle, parameter swt defines whether the linestyle will be scaled with thickness, and parameter numPairs specifies the number of length pairs defining the linestyle.

The linestyle is defined by up to five black/white length pairs, which are specified in parameters b1,w1 through b5,w5. The minimum length of any given black or white parameter is 1 point, or 1/72 of an inch, and the line specification must be in pairs.

Example:

SetDashStyle('My Dash Style', True,0,1",1/4",1/4",1/4");



  SetDefaultBeginningMarker Document Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   SetDefaultBeginningMarker
(   style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL;
    visibility :BOOLEAN
) :BOOLEAN ;

Python:

def  vs.SetDefaultBeginningMarker(style, angle, size, width, thicknessBasis, thickness, visibility):
   return BOOLEAN

Description:

Sets all properties of the document default beginning marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
BEGIN
	ok := SetDefaultBeginningMarker(2176, 15, 0.5, 0, 0, 2, TRUE);
END;

RUN(Example);

See Also:

SetDefaultEndMarker  



  SetDefaultEndMarker Document Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   SetDefaultEndMarker
(   style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL;
    visibility :BOOLEAN
) :BOOLEAN ;

Python:

def  vs.SetDefaultEndMarker(style, angle, size, width, thicknessBasis, thickness, visibility):
   return BOOLEAN

Description:

Sets all properties of the document default end marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
BEGIN
	ok := SetDefaultEndMarker(2176, 15, 0.5, 0, 0, 2, TRUE);	
END;

RUN(Example);

See Also:

SetDefaultBeginningMarker  



  SetDefaultOpacity Document Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   SetDefaultOpacity
( opacity:INTEGER ) ;

Python:

def  vs.SetDefaultOpacity(opacity):
   return None

Description:

Sets the default opacity to document.

Parameters:

opacity The opacity as percent value in range [0-100].



  SetDefaultOpacityByClass Document Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   SetDefaultOpacityByClass
;

Python:

def  vs.SetDefaultOpacityByClass():
   return None

Description:

Sets the default opacity to use the current class opacity.



  SetDocumentDefaultSketchStyle Document Attributes 
VectorWorks11.5

VectorScript Declaration:

FUNCTION   SetDocumentDefaultSketchStyle
( sketchName:STRING ) :BOOLEAN ;

Python:

def  vs.SetDocumentDefaultSketchStyle(sketchName):
   return BOOLEAN

Description:

Sets the document default sketch style. Set sketchName to 'No Sketch' to set the document default sketch to 'No Sketch'.

Parameters:

sketchName Sketch Style name.



  SetGradientData Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetGradientData
(   gradient :HANDLE;
  VAR  segmentIndex :INTEGER;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Python:

def  vs.SetGradientData(gradient, segmentIndex, spotPosition, midpointPosition, red, green, blue):
   return segmentIndex

Description:

Sets the spot position, midpoint position and color of the specified gradient segment.

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

segmentIndex := 4;
SetGradientData(gradientHandle, segmentIndex, 0.9, 0.5, 255, 255, 255);



  SetGradientDataN Document Attributes 
Vectorworks 2015

VectorScript Declaration:

PROCEDURE   SetGradientDataN
(   gradient :HANDLE;
  VAR  segmentIndex :INTEGER;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT;
    opacity :INTEGER
) ;

Python:

def  vs.SetGradientDataN(gradient, segmentIndex, spotPosition, midpointPosition, red, green, blue, opacity):
   return segmentIndex

Description:

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
red Red component of the color spot's color.
green Green component of the color spot's color.
blue Blue component of the color spot's color.
opacity Opacity of the color spot.

Example:

segmentIndex := 4;
SetGradientData(gradientHandle, segmentIndex, 0.9, 0.5, 255, 255, 255,100);

See Also:

GetGradientDataN   InsertGradientData  



  SetGradientMidpointPosition Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetGradientMidpointPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
    position :REAL
) ;

Python:

def  vs.SetGradientMidpointPosition(gradient, segmentIndex, position):
   return None

Description:

Sets the midpoint position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
position Position of the segment's midpoint relatvie to color spot immediately to left.
(position >= 0.0 and position <= 1.0)

Example:

SetGradientMidpointPosition(gradientHandle, 4, 0.6);



  SetGradientOpacity Document Attributes 
Vectorworks 2015

VectorScript Declaration:

PROCEDURE   SetGradientOpacity
(   gradient :HANDLE;
    segmentIndex :INTEGER;
    opacity :INTEGER
) ;

Python:

def  vs.SetGradientOpacity(gradient, segmentIndex, opacity):
   return None

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
opacity Opacity at the spot position.

Example:

SetGradientSpotColor(gradientHandle, 4, 100);

See Also:

GetGradientOpacity  



  SetGradientSpotColor Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetGradientSpotColor
(   gradient :HANDLE;
    segmentIndex :INTEGER;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Python:

def  vs.SetGradientSpotColor(gradient, segmentIndex, red, green, blue):
   return None

Description:

Sets the spot color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

SetGradientSpotColor(gradientHandle, 4, 255, 255, 255);



  SetGradientSpotPosition Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetGradientSpotPosition
(   gradient :HANDLE;
  VAR  segmentIndex :INTEGER;
    position :REAL
) ;

Python:

def  vs.SetGradientSpotPosition(gradient, segmentIndex, position):
   return segmentIndex

Description:

Sets the spot position of the specified gradient segment.

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
position Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)

Example:

SetGradientSpotPosition(gradientHandle, segmentIndex, 0.9);



  SetTileBackgroundColor Document Attributes 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   SetTileBackgroundColor
(   tileHandle :HANDLE;
    backgroundColorR :INTEGER;
    backgroundColorG :INTEGER;
    backgroundColorB :INTEGER
) ;

Python:

def  vs.SetTileBackgroundColor(tileHandle, backgroundColor):
   return None

Description:

Gets the specified tile resource's background color.

Parameters:

tileHandle The tile resource in which to set the background color.
backgroundColor The RGB background color to set.

Example:

SetTileBackgroundColor(tileHandle, backgroundColor);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  SetTileOffsetPoint Document Attributes 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   SetTileOffsetPoint
(   tileHandle :HANDLE;
  VAR  offsetPointX :REAL;
  VAR  offsetPointY :REAL
) ;

Python:

def  vs.SetTileOffsetPoint(tileHandle, offsetPoint):
   return None

Description:

Sets the specified tile resource's offset point.

Parameters:

tileHandle The tile resource in which to set the offset point.
offsetPoint The offsets point to be set.

Example:

SetTileRepetitionPoint(tileHandle, offsetPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  SetTileRepetitionPoint Document Attributes 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   SetTileRepetitionPoint
(   tileHandle :HANDLE;
  VAR  repetitionPointX :REAL;
  VAR  repetitionPointY :REAL
) ;

Python:

def  vs.SetTileRepetitionPoint(tileHandle, repetitionPoint):
   return None

Description:

Sets the specified tile resource's repetition point.

Parameters:

tileHandle The tile resource in which to set the repetition point.
repetitionPoint The repetition point to be set.

Example:

SetTileRepetitionPoint(tileHandle, repetitionPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  SheetList Document Attributes 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   SheetList
( sheetIndex:INTEGER ) :STRING ;

Python:

def  vs.SheetList(sheetIndex):
   return STRING

Description:

Returns the name of the sheet specified by index.

Parameters:

sheetIndex Index of the sheet

Result:

Returns a string containing the name of the sheet.

See Also:

SheetNum  



  SheetNum Document Attributes 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   SheetNum
:INTEGER ;

Python:

def  vs.SheetNum():
   return INTEGER

Description:

Returns the number of sheets contained within the current document.

Result:

The number of sheets.

See Also:

SheetList  



  ShowCreateImageDialog Document Attributes 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   ShowCreateImageDialog
:HANDLE ;

Python:

def  vs.ShowCreateImageDialog():
   return HANDLE

Description:

Displays a dialog that allows the user to select an image file from which a new image resource is created.

Result:

Returns the handle to the newly created image resource if successful; nil otherwise.

Example:

imageHandle := ShowCreateImageDialog;



  ShowGradientEditorDialog Document Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   ShowGradientEditorDialog
VAR gradient:HANDLE ) ;

Python:

def  vs.ShowGradientEditorDialog(gradient):
   return gradient

Description:

Displays the gradient editor dialog for the specified gradient.

To create and edit a new gradient resource, pass in a handle variable initialized to nil. If successful, the handle variable will be initialized with the handle to the new gradient resource.

Parameters:

gradient The gradient resource to display in the editor dialog; nil if a new gradient is to be created.

Example:

ShowGradientEditorDialog(gradientHandle);
{ displays the specified gradient resource in the editor }

newGradientHandle := nil;
ShowGradientEditorDialog(newGradientHandle);
{ creates a new gradient resource and displays it in the editor }



  ShowPlanShadowsTab Document Attributes 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   ShowPlanShadowsTab
:BOOLEAN ;

Python:

def  vs.ShowPlanShadowsTab():
   return BOOLEAN

Description:

Opens the Pane Shadows tab of the Document Preferences dialog