GetClass Object Attributes 
MiniCAD

VectorScript Declaration:

FUNCTION   GetClass
( h:HANDLE ) :STRING ;

Python:

def  vs.GetClass(h):
   return STRING

Description:

Function GetClass returns the class assigned to the referenced object. None is returned if the object has no class assigned to it.

Parameters:

h Handle to object.

Example:

ObjectClass:=GetClass(handleToObject);



  GetDescriptionText Object Attributes 
Vectorworks 2015

VectorScript Declaration:

PROCEDURE   GetDescriptionText
(   hObject :HANDLE;
  VAR  descriptionText :DYNARRAY[] of CHAR
) ;

Python:

def  vs.GetDescriptionText(hObject):
   return descriptionText

Description:

Retrieves any description text that exists for a specified object and passes it back in the descriptionText argument. The descriptionText argument will be empty if the object has no description text.

Parameters:

hObject Handle of object for which to retrieve the text.
descriptionText Object's description text, if any exists.

Example:

PROCEDURE GetDescExample;
VAR
	descriptionTextDyn	:DYNARRAY [] of CHAR;
	tempH : HANDLE;
BEGIN
	tempH := GetObject ('Dimension');

	GetDescriptionText (tempH, descriptionTextDyn);

	IF descriptionTextDyn <> ''  THEN 
		Message (descriptionTextDyn)
	ELSE
		Message ('no description');
END;
Run (GetDescExample);

See Also:

SetDescriptionText  



  GetEntityMatrix Object Attributes 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   GetEntityMatrix
(   objectHandle :HANDLE;
  VAR  offsetX :REAL;
  VAR  offsetY :REAL;
  VAR  offsetZ :REAL;
  VAR  rotationXAngle :REAL;
  VAR  rotationYAngle :REAL;
  VAR  rotationZAngle :REAL
) :BOOLEAN ;

Python:

def  vs.GetEntityMatrix(objectHandle):
   return (BOOLEAN, offset, rotationXAngle, rotationYAngle, rotationZAngle)

Description:

Gets the matrix of the plane for a planar object.

Parameters:

objectHandle The object for which the matrix of its plane is being obtained.
offset The offset of the plane in current document units.
rotationXAngle The rotation of the plane about the X-axis in degrees.
rotationYAngle The rotation of the plane about the Y-axis in degrees.
rotationZAngle The rotation of the plane about the Z-axis in degrees.

Result:

Returns true if the object passed is a planar object.



  GetFillBack Object Attributes 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   GetFillBack
(   h :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetFillBack(h):
   return (red, green, blue)

Description:

Procedure GetFillBack returns the fill background color of the referenced object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

GetFillBack(handleToObject,redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  GetFillFore Object Attributes 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   GetFillFore
(   h :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetFillFore(h):
   return (red, green, blue)

Description:

Procedure GetFillFore returns the fill foreground color of the referenced object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

GetFillFore(handleToObject,redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  GetFillIAxisEndPoint Object Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetFillIAxisEndPoint
(   objectHandle :HANDLE;
  VAR  xIAxisEndPoint :REAL;
  VAR  yIAxisEndPoint :REAL
) ;

Python:

def  vs.GetFillIAxisEndPoint(objectHandle):
   return (xIAxisEndPoint, yIAxisEndPoint)

Description:

Gets the I-axis end point of the fill.

Note: only works with 2D objects that have a gradient or image fill.

Parameters:

objectHandle Handle to the object with fill.
xIAxisEndPoint X coordinate of I-axis point.
yIAxisEndPoint Y coordinate of I-axis point.

Example:

GetFillIAxisEndPoint(objectHandle, xIAxis, yIAxis);



  GetFillJAxisEndPoint Object Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetFillJAxisEndPoint
(   objectHandle :HANDLE;
  VAR  xJAxisEndPoint :REAL;
  VAR  yJAxisEndPoint :REAL
) ;

Python:

def  vs.GetFillJAxisEndPoint(objectHandle):
   return (xJAxisEndPoint, yJAxisEndPoint)

Description:

Gets the J-axis end point of the fill.

Note: only works with 2D objects that have a gradient or image fill.

Parameters:

objectHandle Handle to the object with fill.
xJAxisEndPoint X coordinate of J-axis point.
yJAxisEndPoint Y coordinate of J-axis point.

Example:

GetFillJAxisEndPoint(objectHandle, xJAxis, yJAxis);



  GetFillOriginPoint Object Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetFillOriginPoint
(   objectHandle :HANDLE;
  VAR  xOriginPoint :REAL;
  VAR  yOriginPoint :REAL
) ;

Python:

def  vs.GetFillOriginPoint(objectHandle):
   return (xOriginPoint, yOriginPoint)

Description:

Gets the origin point of the fill.

Note: only works with 2D objects that have a gradient or image fill.

Parameters:

objectHandle Handle to the object with fill.
xOriginPoint X coordinate of origin point.
yOriginPoint Y coordinate of origin point.

Example:

GetFillOriginPoint(objectHandle, xOrigin, yOrigin);



  GetFillPoints Object Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetFillPoints
(   objectHandle :HANDLE;
  VAR  xOriginPoint :REAL;
  VAR  yOriginPoint :REAL;
  VAR  xIAxisEndPoint :REAL;
  VAR  yIAxisEndPoint :REAL;
  VAR  xJAxisEndPoint :REAL;
  VAR  yJAxisEndPoint :REAL
) ;

Python:

def  vs.GetFillPoints(objectHandle):
   return (xOriginPoint, yOriginPoint, xIAxisEndPoint, yIAxisEndPoint, xJAxisEndPoint, yJAxisEndPoint)

Description:

Gets start and axis end points of the fill.

Note: only works with 2D objects that have a gradient or image fill.

Parameters:

objectHandle Handle to the object with fill.
xOriginPoint X coordinate of origin point.
yOriginPoint Y coordinate of origin point.
xIAxisEndPoint X coordinate of I-axis point.
yIAxisEndPoint Y coordinate of I-axis point.
xJAxisEndPoint X coordinate of J-axis point.
yJAxisEndPoint Y coordinate of J-axis point.

Example:

GetFillPoints(objectHandle, xOrigin, yOrigin, xIAxis, yIAxis, xJAxis, yJAxis);



  GetFPat Object Attributes 
MiniCAD

VectorScript Declaration:

FUNCTION   GetFPat
( h:HANDLE ) :LONGINT ;

Python:

def  vs.GetFPat(h):
   return LONGINT

Description:

Function GetFPat returns the fill pattern of the referenced object.

A positive value corresponds to the index of the fill pattern on the pattern palette. A negative value corresponds to internal index of a vector fill pattern applied to the object.

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

Parameters:

h Handle to object.

Example:

FPatValue:=GetFPat(HandleToObj);



  GetLS Object Attributes 
MiniCAD - obsolete as of Vectorworks 2013

VectorScript Declaration:

FUNCTION   GetLS
( h:HANDLE ) :INTEGER ;

Python:

def  vs.GetLS(h):
   return INTEGER

Special Notes:

GetLS is obsolete as of Vectorworks 2013

Description:

Function GetLS returns the line style of the referenced object.

Parameters:

h Handle to object.

Example:

lStyleValue:=GetLS(handleToObject);



  GetLSN Object Attributes 
Vectorworks 2013

VectorScript Declaration:

FUNCTION   GetLSN
( h:HANDLE ) :LONGINT ;

Python:

def  vs.GetLSN(h):
   return LONGINT

Description:

Function GetLSN returns the line style of the referenced object.

Parameters:

h Handle to object.

See Also:

SetLSN  



  GetLW Object Attributes 
MiniCAD

VectorScript Declaration:

FUNCTION   GetLW
( h:HANDLE ) :INTEGER ;

Python:

def  vs.GetLW(h):
   return INTEGER

Description:

Function GetLW returns the line weight of the referenced object. The value returned represents the width in mils.

Parameters:

h Handle to object.

Example:

PROCEDURE GetLWExample;
VAR
	x, y :REAL;
	h :HANDLE;
BEGIN
	GetPt(x, y);
	h := PickObject(x, y);
	IF h <> NIL THEN Message(GetLW(h));
END;
RUN(GetLWExample);



  GetMarker Object Attributes 
VectorWorks10.0 - obsolete as of VectorWorks 2008

VectorScript Declaration:

PROCEDURE   GetMarker
(   h :HANDLE;
  VAR  start :BOOLEAN;
  VAR  end :BOOLEAN;
  VAR  style :INTEGER;
  VAR  size :REAL
) ;

Python:

def  vs.GetMarker(h):
   return (start, end, style, size)

Special Notes:

GetMarker is obsolete as of VectorWorks 2008

Description:

Returns marker information on the referenced object.

Parameters:

h Handle to the object.
start True if a marker is visible at start of object.
end True if a marker is visible at end of object.
style Marker style:
0 - Filled Arrow Marker
1 - Empty Arrow Marker
2 - Open Arrow Marker
3 - Filled Ball Marker
4 - Empty Ball Marker
5 - Slash Marker
6 - Cross Marker
size Size of marker.

Example:

PROCEDURE CheckMarker;
VAR
	h: HANDLE;
	MarkerStyle: INTEGER;
	StartMark, EndMark: BOOLEAN;
	Size: REAL;
BEGIN
	h := FSActLayer;
	GetMarker(H, StartMark, EndMark, MarkerStyle, Size);
	Message('StartMark: ', StartMark, ' EndMark:', EndMark, ' MarkerStyle:', MarkerStyle, ' Size:', Size);
END;
RUN(CheckMarker);

See Also:

SetMarker  



  GetObjArrow Object Attributes 
VectorWorks10.0 - obsolete as of VectorWorks 2008

VectorScript Declaration:

PROCEDURE   GetObjArrow
(   obj :HANDLE;
  VAR  style :INTEGER;
  VAR  size :REAL;
  VAR  angle :INTEGER;
  VAR  start :BOOLEAN;
  VAR  end :BOOLEAN
) ;

Python:

def  vs.GetObjArrow(obj):
   return (style, size, angle, start, end)

Special Notes:

GetObjArrow is obsolete as of VectorWorks 2008

Description:

Procedure GetObjArrow returns the arrow style parameters for the indicated object.

Parameters:

obj The indicated object.
style Returns arrow style.
size Returns arrow size in inches measured in page space.
angle Returns arrow angle (in degrees).
start Returns whether the start point of the object has an arrow.
end Returns whether the endpoint of the object has an arrow.

Example:

PROCEDURE ShowObjArrowValues;
VAR
	style :INTEGER;
	size	 :REAL;
	ang	 :INTEGER;
	start :BOOLEAN;
	endPt :BOOLEAN;
	obj   :HANDLE;
BEGIN
	obj := FSActLayer;
	GetObjArrow(obj, style, size, ang, start, endPt);
	Message(style, ' ', size, ' ', ang, ' ', start, ' ', endPt);
END;
RUN(ShowObjArrowValues);



  GetObjBeginningMarker Object Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   GetObjBeginningMarker
(   object :HANDLE;
  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.GetObjBeginningMarker(object):
   return (BOOLEAN, style, angle, size, width, thicknessBasis, thickness, visibility)

Description:

Gets all properties for an object's beginning marker. Return TRUE if operation was successful.

Parameters:

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

Example:

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

	ok : BOOLEAN;
	
BEGIN
	h := FSActLayer;
	ok := GetObjBeginningMarker (h, style, angle, size, width, thickBasis, thickness, visibility);
	Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);
END;

RUN(Example);

See Also:

GetObjEndMarker  



  GetObjEndMarker Object Attributes 
VectorWorks 2008

VectorScript Declaration:

FUNCTION   GetObjEndMarker
(   object :HANDLE;
  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.GetObjEndMarker(object):
   return (BOOLEAN, style, angle, size, width, thicknessBasis, thickness, visibility)

Description:

Gets all properties for an object's end marker. Return TRUE if operation was successful.

Parameters:

object Handle to object.
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
	h: HANDLE;
	style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	visibility: BOOLEAN;

	ok : BOOLEAN;
	
BEGIN
	h := FSActLayer;
	ok := GetObjEndMarker (h, style, angle, size, width, thickBasis, thickness, visibility);
	Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);
END;

RUN(Example);

See Also:

GetObjBeginningMarker  



  GetOpacity Object Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   GetOpacity
(   h :HANDLE;
  VAR  opacity :INTEGER
) ;

Python:

def  vs.GetOpacity(h):
   return opacity

Description:

Gets the opacity of and object. Opacity is obtained as percentage value in range [0-100].

Parameters:

h The object which opacity will be get.
opacity Output parameter. Return the object's opacity as percentage value in range [0-100].



  GetOpacityByClass Object Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   GetOpacityByClass
(   h :HANDLE;
  VAR  isByClass :BOOLEAN
) ;

Python:

def  vs.GetOpacityByClass(h):
   return isByClass

Description:

Returns whether the object is using the class opacity.



  GetPenBack Object Attributes 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   GetPenBack
(   h :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetPenBack(h):
   return (red, green, blue)

Description:

Procedure GetPenBack returns the pen background color of the referenced object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

PROCEDURE Example;
VAR
	h :HANDLE;
	r, g, b :LONGINT;
BEGIN
	h := FSActLayer;
	GetPenBack(h, r, g, b);
	Message('r= ', r, ' g= ', g, ' b= ', b);
END;
RUN(Example);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  GetPenFore Object Attributes 
MiniCAD6.0

VectorScript Declaration:

PROCEDURE   GetPenFore
(   h :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Python:

def  vs.GetPenFore(h):
   return (red, green, blue)

Description:

Procedure GetPenFore returns the pen foreground color components of the referenced object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

GetPenFore(handleToObject,redValue,greenValue,blueValue);

See Also:

ColorIndexToRGB   RGBToColorIndex  



  GetViewMatrix Object Attributes 
VectorWorks10.5

VectorScript Declaration:

FUNCTION   GetViewMatrix
(   objectHandle :HANDLE;
  VAR  offsetX :REAL;
  VAR  offsetY :REAL;
  VAR  offsetZ :REAL;
  VAR  rotationXAng :REAL;
  VAR  rotationYAng :REAL;
  VAR  rotationZAng :REAL
) :BOOLEAN ;

Python:

def  vs.GetViewMatrix(objectHandle):
   return (BOOLEAN, offset, rotationXAng, rotationYAng, rotationZAng)

Description:

Gets view matrix for layer or viewport object.



  IsFillColorByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   IsFillColorByClass
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsFillColorByClass(h):
   return BOOLEAN

Description:

Function IsFillColorByClass returns whether class fill colors are used for the referenced object.

Parameters:

h Handle to object.



  IsFPatByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   IsFPatByClass
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsFPatByClass(h):
   return BOOLEAN

Description:

Function IsFPatByClass whether a class fill pattern is used for the referenced object.

Parameters:

h Handle to object.



  IsLSByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   IsLSByClass
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsLSByClass(h):
   return BOOLEAN

Description:

Function IsLSByClass returns whether a class line style is used for the referenced object.

Parameters:

h Handle to object.



  IsLWByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   IsLWByClass
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsLWByClass(h):
   return BOOLEAN

Description:

Function IsLWByClass returns whether a class line weight is used for the referenced object.

Parameters:

h Handle to object.

Example:

PROCEDURE Example;
VAR
   symDefHandle, h :HANDLE;

PROCEDURE AlertMe;
BEGIN
   Message(GetSDName(symDefHandle));
   SetSelect(h);
END;

BEGIN
   DSelectAll;
   ClrMessage;
   symDefHandle := FSymDef;
   WHILE symDefHandle <> NIL DO BEGIN
      h := FInSymDef(symDefHandle);
      WHILE h <> NIL DO BEGIN
         IF IsLWByClass(h) THEN AlertMe;
         h := NextObj(h);
      END;
      symDefHandle := NextObj(symDefHandle);
   END;
END;
RUN(Example);



  IsMarkerByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   IsMarkerByClass
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsMarkerByClass(h):
   return BOOLEAN

Description:

Function IsMarkerByClass returns whether a class marker style is used for the referenced object.

Parameters:

h Handle to object.



  IsObjectFlipped Object Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   IsObjectFlipped
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsObjectFlipped(h):
   return BOOLEAN

Description:

Function IsObjectFlipped returns the flip orientation of the specified 3D object. The function returns TRUE if the object is currently flipped.

This function works for sweeps, extrudes, multiple extrudes, symbols, solids, layer references, and plug-in objects.

Parameters:

h Handle to object.

Example:

FUNCTION ObjFlippedInWall(objH, wallH :HANDLE) :BOOLEAN;
BEGIN
	ObjFlippedInWall := ((Trunc(GetSymRot(objH)) <> Trunc(HAngle(wallH))) = IsObjectFlipped(objH)); 
END;

See Also:

IsFlipped  



  IsPenColorByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   IsPenColorByClass
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsPenColorByClass(h):
   return BOOLEAN

Description:

Function IsPenColorByClass returns whether class pen colors are used for the referenced object.

Parameters:

h Handle to object.



  IsTextStyleByClass Object Attributes 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   IsTextStyleByClass
( objectId:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsTextStyleByClass(objectId):
   return BOOLEAN

Description:

Procedure IsTextStyleByClass returns whether the class text style is used for the referenced object.

Parameters:

objectId handle to object

See Also:

SetTextStyleRef   GetTextStyleRef   SetTextStyleRefN   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  SetClass Object Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetClass
(   h :HANDLE;
    class :STRING
) ;

Python:

def  vs.SetClass(h, class):
   return None

Description:

Procedure SetClass assigns a class to the referenced object.

Parameters:

h Handle to object.
class Name of class to assign to object.

Example:

SetClass(ObjHd,'Dimension');



  SetDescriptionText Object Attributes 
Vectorworks 2015

VectorScript Declaration:

FUNCTION   SetDescriptionText
(   hObject :HANDLE;
    descriptionText :DYNARRAY[] of CHAR
) :BOOLEAN ;

Python:

def  vs.SetDescriptionText(hObject, descriptionText):
   return BOOLEAN

Description:

Sets the user-supplied description for an object.
Adds the description data node if one does not already exist.

Parameters:

hObject Handle of the object for which the description should be set.
descriptionText The description text to be set for the object

Result:

true if text was successfully set; false if error occurred.

See Also:

GetDescriptionText  



  SetEntityMatrix Object Attributes 
Vectorworks 2011

VectorScript Declaration:

FUNCTION   SetEntityMatrix
(   objectHandle :HANDLE;
    offsetX :REAL;
    offsetY :REAL;
    offsetZ :REAL;
    rotationXAngle :REAL;
    rotationYAngle :REAL;
    rotationZAngle :REAL
) :BOOLEAN ;

Python:

def  vs.SetEntityMatrix(objectHandle, offset, rotationXAngle, rotationYAngle, rotationZAngle):
   return BOOLEAN

Description:

Sets the matrix of the plane for a planar object. If there is already a plane in the document with that matrix, the object will be set to be in that plane. Otherwise a new plane will be added to the document.

Parameters:

objectHandle The object whose plane is being set.
offset The offset of the plane in current document units.
rotationXAngle The rotation of the plane about the X-axis in degrees.
rotationYAngle The rotation of the plane about the Y-axis in degrees.
rotationZAngle The rotation of the plane about the Z-axis in degrees.

Result:

Returns true if the object passed is a planar object.



  SetFillBack Object Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetFillBack
(   h :HANDLE;
    colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.SetFillBack(h, color):
   return None

Description:

Procedure SetFillBack sets the fill background color setting of the specified object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
color RGB color value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  SetFillColorByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetFillColorByClass
( h:HANDLE ) ;

Python:

def  vs.SetFillColorByClass(h):
   return None

Description:

Procedure SetFillColorByClass sets the referenced object to use the class attribute fill colors.

Parameters:

h Handle to object.



  SetFillFore Object Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetFillFore
(   h :HANDLE;
    colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.SetFillFore(h, color):
   return None

Description:

Procedure SetFillFore sets the fill foreground color setting of the referenced object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
color RGB color value.

Example:

SetFillFore(h, 65535, 0, 0);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  SetFillIAxisEndPoint Object Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetFillIAxisEndPoint
(   objectHandle :HANDLE;
    xIAxisEndPoint :REAL;
    yIAxisEndPoint :REAL
) ;

Python:

def  vs.SetFillIAxisEndPoint(objectHandle, xIAxisEndPoint, yIAxisEndPoint):
   return None

Description:

Sets the I-axis end point of the fill.

Note: only works with 2D objects that have a gradient or image fill.

Parameters:

objectHandle Handle to the object with fill.
xIAxisEndPoint X coordinate of I-axis point.
yIAxisEndPoint Y coordinate of I-axis point.

Example:

SetFillIAxisEndPoint(objectHandle, 20.0, 10.0);



  SetFillJAxisEndPoint Object Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetFillJAxisEndPoint
(   objectHandle :HANDLE;
    xJAxisEndPoint :REAL;
    yJAxisEndPoint :REAL
) ;

Python:

def  vs.SetFillJAxisEndPoint(objectHandle, xJAxisEndPoint, yJAxisEndPoint):
   return None

Description:

Sets the J-axis end point of the fill.

Note: only works with 2D objects that have a gradient or image fill.

Parameters:

objectHandle Handle to object with fill.
xJAxisEndPoint X coordinate of J-axis point.
yJAxisEndPoint Y coordinate of J-axis point.

Example:

SetFillJAxisEndPoint(objectHandle, 15.0, 25.0);



  SetFillOriginPoint Object Attributes 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetFillOriginPoint
(   objectHandle :HANDLE;
    xOriginPoint :REAL;
    yOriginPoint :REAL
) ;

Python:

def  vs.SetFillOriginPoint(objectHandle, xOriginPoint, yOriginPoint):
   return None

Description:

Sets the origin point of the fill.

Note: only works with 2D objects that have a gradient or image fill.

Parameters:

objectHandle Handle to the object with fill.
xOriginPoint X coordinate of origin point.
yOriginPoint Y coordinate of origin point.

Example:

SetFillOriginPoint(objectHandle, 10.0, 20.0);



  SetFPat Object Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetFPat
(   h :HANDLE;
    fillPattern :LONGINT
) ;

Python:

def  vs.SetFPat(h, fillPattern):
   return None

Description:

Procedure SetFPat sets the fill pattern of the referenced object.

To apply a bitmap fill pattern, use positive value corresponding to the index of the bitmap pattern. To apply a vector fill pattern, use the negative of the vector fill index (index * -1).

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

Parameters:

h Handle to object.
fillPattern Fill index value.

Example:

{ Apply a bitmap fill pattern. }
SetFPat(objectOne, 47);

{ Apply a vector fill. }
SetFPat(objectTwo, -Name2Index('My Hatch'));



  SetFPatByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetFPatByClass
( h:HANDLE ) ;

Python:

def  vs.SetFPatByClass(h):
   return None

Description:

Procedure SetFPatByClass sets the referenced object to use the class attribute fill pattern.

Parameters:

h Handle to object.



  SetLS Object Attributes 
MiniCAD - obsolete as of Vectorworks 2013

VectorScript Declaration:

PROCEDURE   SetLS
(   h :HANDLE;
    ls :INTEGER
) ;

Python:

def  vs.SetLS(h, ls):
   return None

Special Notes:

SetLS is obsolete as of Vectorworks 2013

Description:

Procedure SetLS sets the linestyle of the referenced object.

If the value is in the range 0 to 71, the specified fill pattern is applied as the linestyle; a value in the range of -1 to -8 will apply the specified linestyle.

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

Parameters:

h Handle to object.
ls Linestyle to apply to object.

Example:

PROCEDURE Example;
VAR
	cnt :INTEGER;
BEGIN
	PushAttrs;
	TextSize(1);
	TextJust(3);
	TextVerticalAlign(3);
	FOR cnt := -10 TO 71 DO BEGIN
		TextOrigin(-2, cnt);
		CreateText(Concat(cnt));
		MoveTo(0, cnt);
		LineTo(24", cnt);
		SetLS(LNewObj, cnt);
	END;
	PopAttrs;
END;
RUN(Example);



  SetLSByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetLSByClass
( h:HANDLE ) ;

Python:

def  vs.SetLSByClass(h):
   return None

Description:

Procedure SetLSByClass sets the referenced object to use the class attribute line style.

Parameters:

h Handle to object.



  SetLSN Object Attributes 
Vectorworks 2013

VectorScript Declaration:

PROCEDURE   SetLSN
(   h :HANDLE;
    ls :LONGINT
) ;

Python:

def  vs.SetLSN(h, ls):
   return None

Description:

Procedure SetLSN sets the linestyle of the referenced object.

If the value is in the range 0 to 71, the specified fill pattern is applied as the linestyle; a negative value will apply the line type whose index is the negative of the value.

Parameters:

h Handle to object.
ls Linestyle to apply to object.

See Also:

GetLSN  



  SetLW Object Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetLW
(   h :HANDLE;
    lw :INTEGER
) ;

Python:

def  vs.SetLW(h, lw):
   return None

Description:

Procedure SetLW sets the line weight of the referenced object.

Parameters:

h Handle to object
lw Line weight to be applied to object (in mils).

Example:

SetLW(ObjHd,12);



  SetLWByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetLWByClass
( h:HANDLE ) ;

Python:

def  vs.SetLWByClass(h):
   return None

Description:

Procedure SetLWByClass sets the referenced object to use the class attribute line weight.

Parameters:

h Handle to object.



  SetMarker Object Attributes 
VectorWorks10.0 - obsolete as of VectorWorks 2008

VectorScript Declaration:

PROCEDURE   SetMarker
(   h :HANDLE;
    start :BOOLEAN;
    end :BOOLEAN;
    style :INTEGER;
    size :REAL
) ;

Python:

def  vs.SetMarker(h, start, end, style, size):
   return None

Special Notes:

SetMarker is obsolete as of VectorWorks 2008

Description:

Specifies marker information for the referenced object - OBSOLETE procedure: Use SetObjBeginningMarker and/or SetObjEndMarker instead.

Parameters:

h Handle to the object
start True if a marker is visible at start of object.
end True if a marker is visible at end of object.
style Marker style:
0 - Filled Arrow Marker
1 - Empty Arrow Marker
2 - Open Arrow Marker
3 - Filled Ball Marker
4 - Empty Ball Marker
5 - Slash Marker
6 - Cross Marker
size Size of marker

Example:

PROCEDURE Example;
BEGIN
   MoveTo(0, 0);
   LineTo(100, 0);
   SetMarker(LNewObj, TRUE, FALSE, 2, 10000);
END;
RUN(Example);

See Also:

GetMarker   SetObjBeginningMarker   SetObjEndMarker  



  SetMarkerByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetMarkerByClass
( h:HANDLE ) ;

Python:

def  vs.SetMarkerByClass(h):
   return None

Description:

Procedure SetMarkerByClass sets the referenced object to use the class attribute marker style.

Parameters:

h Handle to object.

See Also:

SetObjArrow  



  SetObjArrow Object Attributes 
VectorWorks10.0 - obsolete as of VectorWorks 2008

VectorScript Declaration:

PROCEDURE   SetObjArrow
(   obj :HANDLE;
    style :INTEGER;
    size :REAL;
    angle :INTEGER;
    start :BOOLEAN;
    end :BOOLEAN
) ;

Python:

def  vs.SetObjArrow(obj, style, size, angle, start, end):
   return None

Special Notes:

SetObjArrow is obsolete as of VectorWorks 2008

Description:

Procedure SetObjArrow sets the arrow style parameters for the indicated object.

Marker Styles

Marker Style Constant
Filled Arrow 0
Empty Arrow 1
Open Arrow 2
Filled Circle 3
Empty Circle 4
Slash 5
Cross 6

Parameters:

obj The indicated object.
style The arrow style.
size The arrow size in inches measured in page space.
angle The arrow angle (in degrees).
start Whether the start point of the object has an arrow.
end Whether the endpoint of the object has an arrow.

Example:

PROCEDURE SetObjArrowValues;
BEGIN
	SetObjArrow(FSActLayer, 1, .25, 15, TRUE, TRUE);
END;
RUN(SetObjArrowValues);



  SetObjBeginningMarker Object Attributes 
VectorWorks 2008

VectorScript Declaration:

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

Python:

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

Description:

Sets all properties of an object's beginning marker. Return TRUE if operation was successful.

Parameters:

object Handle to object.
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
	MoveTo (0,0);
LineTo (100, 0);
	ok := SetObjBeginningMarker(LNewObj, 1280, 25, 0.25, 0.125, 34, 2, TRUE);	
END;

RUN(Example);

See Also:

SetObjEndMarker  



  SetObjEndMarker Object Attributes 
VectorWorks 2008

VectorScript Declaration:

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

Python:

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

Description:

Sets all properties of an object's end marker. Return TRUE if operation was successful.

Parameters:

object Handle to object.
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
	MoveTo (0,0);
LineTo (100, 0);
	ok := SetObjEndMarker(LNewObj, 1280, 25, 0.25, 0.125, 34, 2, TRUE);	
END;

RUN(Example);

See Also:

SetObjBeginningMarker  



  SetOpacity Object Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   SetOpacity
(   h :HANDLE;
    opacity :INTEGER
) ;

Python:

def  vs.SetOpacity(h, opacity):
   return None

Description:

Sets the opacity of the object to the opacity passed in.



  SetOpacityByClass Object Attributes 
VectorWorks 2008

VectorScript Declaration:

PROCEDURE   SetOpacityByClass
( h:HANDLE ) ;

Python:

def  vs.SetOpacityByClass(h):
   return None

Description:

Sets the specified class to use the class opacity.



  SetPenBack Object Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetPenBack
(   h :HANDLE;
    colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.SetPenBack(h, color):
   return None

Description:

Procedure SetPenBack sets the pen background color of the referenced object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
color RGB color value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  SetPenColorByClass Object Attributes 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetPenColorByClass
( h:HANDLE ) ;

Python:

def  vs.SetPenColorByClass(h):
   return None

Description:

Procedure SetPenColorByClass sets the referenced object to use the class attribute pen colors.

Parameters:

h Handle to object.



  SetPenFore Object Attributes 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetPenFore
(   h :HANDLE;
    colorR :INTEGER;
    colorG :INTEGER;
    colorB :INTEGER
) ;

Python:

def  vs.SetPenFore(h, color):
   return None

Description:

Procedure SetPenFore sets the pen foreground color of the referenced object. RGB values are in the range of 0~65535.

Parameters:

h Handle to object.
color RGB color value.

Example:

SetPenFore(HandleToObj,65535,0,39321); 

See Also:

RGBToColorIndex   ColorIndexToRGB  



  SetTextStyleByClass Object Attributes 
Vectorworks 2015

VectorScript Declaration:

PROCEDURE   SetTextStyleByClass
( objectId:HANDLE ) ;

Python:

def  vs.SetTextStyleByClass(objectId):
   return None

Description:

SetTextStyleByClass sets the referenced object to use the class text style. To undo this, use SetTextStyleRef on the object.

Parameters:

objectId handle to object

See Also:

SetTextStyleRef   GetTextStyleRef   SetTextStyleRefN   GetTextStyleRefN   SetTextStyleByClass   SetTextStyleByClassN   IsTextStyleByClass   IsTextStyleByClassN  



  SetViewMatrix Object Attributes 
VectorWorks10.5

VectorScript Declaration:

FUNCTION   SetViewMatrix
(   objectHandle :HANDLE;
    offsetX :REAL;
    offsetY :REAL;
    offsetZ :REAL;
    rotationXAng :REAL;
    rotationYAng :REAL;
    rotationZAng :REAL
) :BOOLEAN ;

Python:

def  vs.SetViewMatrix(objectHandle, offset, rotationXAng, rotationYAng, rotationZAng):
   return BOOLEAN

Description:

Sets view matrix for layer or viewport object.



  UpdateThumbnailPreview Object Attributes 
VectorWorks11.0

VectorScript Declaration:

FUNCTION   UpdateThumbnailPreview
( resourceHandle:HANDLE ) :BOOLEAN ;

Python:

def  vs.UpdateThumbnailPreview(resourceHandle):
   return BOOLEAN

Description:

For a given Vectorworks resource (i.e. Hatch, Texture, Symbol/PIO, etc...), this function will create or update it's thumbnail preview.

Parameters:

resourceHandle Handle to the resource.

Result:

This function returns true if the operation was successful, false otherwise.