ActiveClass Classes 

Declaration:

FUNCTION   ActiveClass
:STRING ;

Description:

Returns the name of the active class of the document.

Example:

activeClName:= ActiveClass;

See Also:

ActLayer   ActSymDef  



  ClassList Classes 

Declaration:

FUNCTION   ClassList
( index:LONGINT ) :STRING ;

Description:

Returns the name of the specified class in the document class list. For example, ClassList(4) will return the name of the fourth class in the list.

Parameters:

index Index of class in class list (range of 1- n).

Example:

noneClass := ClassList(1);
dimensionClass := ClassList(2);
classNumber3 := ClassList(3);
classNumber4 := ClassList(4);

See Also:

ClassNum  



  ClassNum Classes 

Declaration:

FUNCTION   ClassNum
:LONGINT ;

Description:

Returns the total number of classes in the active document.

Example:

numOfClasses:= ClassNum;



  DelClass Classes 

Declaration:

PROCEDURE   DelClass
( className:STRING ) ;

Description:

Deletes the specified class from the active document. If there are objects in the class to be deleted, they are reassigned to the None class.

Parameters:

className Name of class to delete.

Example:

DelClass('Future Construction');



  FillColorByClass Classes 

Declaration:

PROCEDURE   FillColorByClass
;

Description:

Sets the default document fill colors to the fill colors of the active class.

See Also:

PenColorByClass   MarkerByClass   FPatByClass  



  FPatByClass Classes 

Declaration:

PROCEDURE   FPatByClass
;

Description:

Sets the default document fill pattern to the fill pattern of the active class.

See Also:

PenColorByClass   MarkerByClass   FillColorByClass  



  GetClassArrow Classes 

Declaration:

PROCEDURE   GetClassArrow
(   className :STRING;
  VAR  style :INTEGER;
  VAR  size :REAL;
  VAR  angle :INTEGER
) ;

Special Notes:

GetClassArrow is obsolete as of VectorWorks13.0

Description:

Procedure GetClassArrow returns the arrow style parameters for the indicated class.

Parameters:

className The indicated class.
style Returns arrow style.
size Returns arrow size in inches measured in page space.
angle Returns arrow angle (in degrees).

Example:

PROCEDURE ShowNoneClassArrowValues;
VAR
	style :INTEGER;
	size  :REAL;
	ang   :INTEGER;
BEGIN
	GetClassArrow('None', style, size, ang);
	Message(style, ' ', size, ' ', ang);
END;
RUN(ShowNoneClassArrowValues);



  GetClassBeginningMarker Classes 

Declaration:

FUNCTION   GetClassBeginningMarker
(   name :STRING;
  VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL
) :BOOLEAN ;

Description:

Gets all properties for the named class' beginning marker. Return TRUE if operation was successful.

Parameters:

name Name of the class
style The marker style (see comments for details)
angle The marker angle in degrees (0 to 90)
size The marker size in pages inches
width The marker width in page inches
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	
BEGIN
	ok := GetClassBeginningMarker('None', style, angle, size, width, thickBasis, thickness);	
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness);	

END;

RUN(Example);

See Also:

GetClassEndMarker  



  GetClassEndMarker Classes 

Declaration:

FUNCTION   GetClassEndMarker
(   name :STRING;
  VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL
) :BOOLEAN ;

Description:

Gets all properties for the named class's end marker. Return TRUE if operation was successful.

Parameters:

name Name of the class
style The marker style (see comments for details)
angle The marker angle in degrees (0 to 90)
size The marker size in pages inches
width The marker width in page inches
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	
BEGIN
	ok := GetClassEndMarker('None', style, angle, size, width, thickBasis, thickness);	
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness);	

END;

RUN(Example);



  GetClassOptions Classes 

Declaration:

FUNCTION   GetClassOptions
:INTEGER ;

Description:

Returns the class visibility setting for the active document.

Visibility Index
Active Only 1
Gray Others 2
Gray/Snap Others 6
Show Others 3
Show/Snap Others 4
Show/Snap/Modify Others 5

Result:

An INTEGER value indicating the current class visibility setting for the document.

See Also:

SetClassOptions  



  GetClFillBack Classes 

Declaration:

PROCEDURE   GetClFillBack
(   className :STRING;
  VAR  colorRV :LONGINT;
  VAR  colorGV :LONGINT;
  VAR  colorBV :LONGINT
) ;

Description:

Returns the fill background color setting of the specified class. The color is returned as the three RGB components of the color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
colorRV Returns RGB color component (red).
colorGV Returns RGB color component (green).
colorBV Returns RGB color component (blue).

Example:

GetClFillBack('Grassy Cover',cRed,cGrn,cBlu);
RGBToColorIndex(cRed,cGrn,cBlu,colorValue);



  GetClFillFore Classes 

Declaration:

PROCEDURE   GetClFillFore
(   className :STRING;
  VAR  colorRV :LONGINT;
  VAR  colorGV :LONGINT;
  VAR  colorBV :LONGINT
) ;

Description:

Returns the fill foreground color setting of the specified class. The color is returned as the RGB components of the color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
colorRV Returns RGB color component (red).
colorGV Returns RGB color component (green).
colorBV Returns RGB color component (blue).

Example:

GetClFillFore('Grassy Cover',cRed,cGrn,cBlu);
RGBToColorIndex(cRed,cGrn,cBlu,colorValue);



  GetClFPat Classes 

Declaration:

FUNCTION   GetClFPat
( className:STRING ) :LONGINT ;

Description:

Returns the fill or hatch pattern of the specified class.

A positive return value in a range of 0 to 71 is the index of the bitmap fill pattern of the class. A negative value is the negative of the fill pattern index (index * -1).

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

Parameters:

className Name of class.

Example:

pbFillStyl:= GetClFPat('Grassy Cover');



  GetClLS Classes 

Declaration:

FUNCTION   GetClLS
( className:STRING ) :INTEGER ;

Description:

Returns the line style of the specified class.

Parameters:

className Name of class.

Example:

pbLineSty:= GetClLS('Property Bounds');



  GetClLW Classes 

Declaration:

FUNCTION   GetClLW
( className:STRING ) :INTEGER ;

Description:

Returns the line weight of the specified class.

Parameters:

className Name of class.

Example:

pbLineWt:= GetClLW('Property Bounds');



  GetClOpacity Classes 

Declaration:

FUNCTION   GetClOpacity
( className:STRING ) :INTEGER ;

Description:

Gets the opacity of the specified class.



  GetClPenBack Classes 

Declaration:

PROCEDURE   GetClPenBack
(   className :STRING;
  VAR  colorRV :LONGINT;
  VAR  colorGV :LONGINT;
  VAR  colorBV :LONGINT
) ;

Description:

Returns the pen background color setting of the specified class. The color is returned as the three RGB components of the color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
colorRV Returns RGB color component (red).
colorGV Returns RGB color component (green).
colorBV Returns RGB color component (blue).



  GetClPenFore Classes 

Declaration:

PROCEDURE   GetClPenFore
(   className :STRING;
  VAR  colorRV :LONGINT;
  VAR  colorGV :LONGINT;
  VAR  colorBV :LONGINT
) ;

Description:

Returns the pen foreground color setting of the specified class. The color is returned as the three RGB components of the color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
colorRV Returns RGB color component (red).
colorGV Returns RGB color component (green).
colorBV Returns RGB color component (blue).

Example:

GetClPenFore('Grassy Cover',cRed,cGrn,cBlu);
RGBToColorIndex(cRed,cGrn,cBlu,colorValue);



  GetClUseGraphic Classes 

Declaration:

FUNCTION   GetClUseGraphic
( className:STRING ) :BOOLEAN ;

Description:

Returns whether the graphic attributes of the specified class will be used at object creation.

Parameters:

className Name of class.

Result:

True indicates that this class is set to use its graphic attributes when objects are created in this class. False indicates that the objects created in this class will get default attributes from the default global attribute settings.



  GetClVectorFill Classes 

Declaration:

FUNCTION   GetClVectorFill
(   className :STRING;
  VAR  hatchName :STRING
) :BOOLEAN ;

Description:

Returns the name of the hatch pattern setting of the specified class.

The function return value will be TRUE if the class uses a hatch pattern, and will be FALSE if the class does not use a hatch pattern.

Parameters:

className Name of class.
hatchName Name of active hatch pattern (if it exists).



  GetCVis Classes 

Declaration:

FUNCTION   GetCVis
( className:STRING ) :INTEGER ;

Description:

Returns the visibility status of the specified class.

Visibility Index Value
Visible 0
Hidden -1
Grayed 2

Parameters:

className Name of class.

Result:

Visibility Index Value
Visible 0
Hidden -1
Grayed 2

Example:

PROCEDURE Example;
BEGIN
	Message(GetCVis('Dimension'));
END;
RUN(Example);



  GrayClass Classes 

Declaration:

PROCEDURE   GrayClass
( className:STRING ) ;

Description:

Sets the visibility of the specified class to grayed status.

Parameters:

className Name of class.

Example:

GrayClass('Phase 2 Construction');



  HideClass Classes 

Declaration:

PROCEDURE   HideClass
( className:STRING ) ;

Description:

Sets the class visibility of the specified class to hidden (invisible) status.

Parameters:

className Name of class.

Example:

HideClass('Dimension');

See Also:

ShowClass  



  LSByClass Classes 

Declaration:

PROCEDURE   LSByClass
;

Description:

Sets the default document line style to the line style of the active class.





  LWByClass Classes 

Declaration:

PROCEDURE   LWByClass
;

Description:

Sets the default document line weight to the line weight of the active class.



  MarkerByClass Classes 

Declaration:

PROCEDURE   MarkerByClass
;

Description:

Sets the default document marker style to the marker style of the active class.



  NameClass Classes 

Declaration:

PROCEDURE   NameClass
( className:STRING ) ;

Description:

Creates a new class in a Vectorworks document, which then become the active class.
If the specified class already exists, then it will become the active class of the document.

Note: Class names cannot exceed 20 characters.

Parameters:

className Name of class.

Example:

NameClass('Revisions');
Rect(4,4,6,6);

{Create a class 'Revisions' in the document}
{The rectangle is then assigned this class }



  OpacityByClass Classes 

Declaration:

PROCEDURE   OpacityByClass
;

Description:

Sets the document default settings to the opacity of the active class.



  PenColorByClass Classes 

Declaration:

PROCEDURE   PenColorByClass
;

Description:

Sets the default document pen colors to the pen colors of the active class.


See Also:

FillColorByClass  



  RenameClass Classes 

Declaration:

PROCEDURE   RenameClass
(   className :STRING;
    newName :STRING
) ;

Description:

Renames the specified class.

All objects assigned to the class being renamed are updated.

Parameters:

className Existing name of the class.
newName New name for the class.



  SetClassArrow Classes 

Declaration:

PROCEDURE   SetClassArrow
(   className :STRING;
    style :INTEGER;
    size :REAL;
    angle :INTEGER
) ;

Special Notes:

SetClassArrow is obsolete as of VectorWorks13.0

Description:

Procedure SetClassArrow sets the arrow style parameters for the indicated class.

Parameters:

className The indicated class.
style The arrow style.
size The arrow size in inches measured in page space.
angle The arrow angle (in degrees).

Example:

SetClassArrow('None', 2, 0.25, 15);



  SetClassBeginningMarker Classes 

Declaration:

FUNCTION   SetClassBeginningMarker
(   name :STRING;
    style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL
) :BOOLEAN ;

Description:

Sets all properties for the named class' beginning marker. Return TRUE if operation was successful.

Parameters:

name Name of the class
style The marker style (see comments for details)
angle The marker angle in degrees (0 to 90)
size The marker size in pages inches
width The marker width in page inches
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;	
BEGIN
	ok := SetClassBeginningMarker('None', 1280, 45, 0.25, 0.25, 0, 2);	
END;

RUN(Example);

See Also:

SetClassEndMarker  



  SetClassEndMarker Classes 

Declaration:

FUNCTION   SetClassEndMarker
(   name :STRING;
    style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL
) :BOOLEAN ;

Description:

Sets all properties for the named class's end marker. Return TRUE if operation was successful.

Parameters:

name Name of the class.
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.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
BEGIN
	ok := SetClassEndMarker('None', 1280, 25, 0.125, 0.125, 0, 2);
END;

RUN(Example);

See Also:

SetClassBeginningMarker  



  SetClassOptions Classes 

Declaration:

PROCEDURE   SetClassOptions
( classOpts:INTEGER ) ;

Description:

Sets class visibility setting for the active document.

Visibility Index
Active Only 1
Gray Others 2
Gray/Snap Others 6
Show Others 3
Show/Snap Others 4
Show/Snap/Modify Others 5

Parameters:

classOpts New class visibility setting.



  SetClFillBack Classes 

Declaration:

PROCEDURE   SetClFillBack
(   className :STRING;
    colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Sets the fill background color of the specified class. The color must be specified using the RGB components of the desired color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
color RGB color value.

Example:

ColorIndexToRGB(98,cRed,cGrn,cBlu);
SetClFillBack('Grassy Cover',cRed,cGrn,cBlu);



  SetClFillFore Classes 

Declaration:

PROCEDURE   SetClFillFore
(   className :STRING;
    colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Sets the fill foreground color of the specified class. The color must be specified using the RGB components of the desired color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
color RGB color value.

Example:

ColorIndexToRGB(24,cRed,cGrn,cBlu);
SetClFillFore('Grassy Cover',cRed,cGrn,cBlu);



  SetClFPat Classes 

Declaration:

PROCEDURE   SetClFPat
(   className :STRING;
    fillpattern :LONGINT
) ;

Description:

Sets the fill pattern of the specified class.

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

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

Parameters:

className Name of class.
fillpattern Fill pattern index value.

Example:

SetClFPat('Grassy Cover',42);



  SetClLS Classes 

Declaration:

PROCEDURE   SetClLS
(   className :STRING;
    LS :INTEGER
) ;

Description:

Sets the line style of the specified class.

Parameters:

className Name of class.
LS Line style index value.

Example:

SetClLS('Property Parcels',-4);



  SetClLW Classes 

Declaration:

PROCEDURE   SetClLW
(   className :STRING;
    LW :INTEGER
) ;

Description:

Sets the line weight of the specified class.

Parameters:

className Name of class.
LW Line weight value (in mils).

Example:

SetClLW('To Be Demolished',28);



  SetClOpacity Classes 

Declaration:

PROCEDURE   SetClOpacity
(   className :STRING;
    opacity :INTEGER
) ;

Description:

Sets the opacity persentage of a class. The opacity is specified by percentage value in range [0-100].

Parameters:

className Name of class.
opacity Opacity specified by percentage value in range [0-100].

Example:

{set opacity of 25%}
SetClOpacity('Cold Water Supply',25);



  SetClPenBack Classes 

Declaration:

PROCEDURE   SetClPenBack
(   className :STRING;
    colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure SetClPenBack sets the pen background color of the specified class. The color must be specified using the RGB components of the desired color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
color RGB color value.

Example:

ColorIndexToRGB(214,cRed,cGrn,cBlu);
SetClPenBack('Cold Water Supply',cRed,cGrn,cBlu);



  SetClPenFore Classes 

Declaration:

PROCEDURE   SetClPenFore
(   className :STRING;
    colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Sets the pen foreground color of the specified class. The color must be specified using the RGB components of the desired color. RGB values are in the range of 0~65535.

Parameters:

className Name of class.
color RGB color value.

Example:

ColorIndexToRGB(214,cRed,cGrn,cBlu);
SetClPenFore('Cold Water Supply',cRed,cGrn,cBlu);



  SetClUseGraphic Classes 

Declaration:

PROCEDURE   SetClUseGraphic
(   className :STRING;
    use :BOOLEAN
) ;

Description:

Toggles the document setting for using the graphic attributes of the specified class at object creation.

Parameters:

className Name of class.
use Use graphic attributes on-off setting.

Example:

SetClUseGraphic('Forested Cover',TRUE);



  SetClUseTexture Classes 

Declaration:

PROCEDURE   SetClUseTexture
(   className :STRING;
    use :BOOLEAN
) ;

Description:

Toggles the document setting for using the texture attributes of the specified class at object creation.

Parameters:

className Name of class.
use Use texture attributes on-off setting.

Example:

SetClUseTexture('Proposed Roof',TRUE);



  SetClVectorFill Classes 

Declaration:

FUNCTION   SetClVectorFill
(   className :STRING;
    hatchName :STRING
) :BOOLEAN ;

Description:

Sets the class fill style to use the specified hatch pattern. The function return value will be TRUE if the operation was successful.

Parameters:

className Name of class.
hatchName Name of hatch pattern.



  ShowClass Classes 

Declaration:

PROCEDURE   ShowClass
( className:STRING ) ;

Description:

Sets the visibility of the specified class to normal (visible) status.

Parameters:

className Name of class.

Example:

ShowClass('Dimension');

See Also:

HideClass