Angle Criteria 

Declaration:

FUNCTION   Angle
( c:CRITERIA ) :REAL ;

Description:

Returns the angle value of a line segment or an arc. If more than one line segment or arc matches the search criteria, the function will return the sum of the matching objects' angle values.

Parameters:

c Search criteria.

Result:

If an object matches the search criteria but is not a line segment or an arc, the value 0(zero) is returned.

Example:

aValue:=Angle(N='LineSeg');



  Area Criteria 

Declaration:

FUNCTION   Area
( c:CRITERIA ) :REAL ;

Special Notes:

Area is obsolete as of VectorWorks12.5

Description:

Returns the area of an object. If more than one object matches the search criteria, the function will return the sum of all the matching object areas.

Parameters:

c Search criteria.

Example:

totalA:=Area((C='Plywood')and(L='First'));
{returns the area of all objects in class 'Plywood' on layer 'First'}



  BotBound Criteria 

Declaration:

FUNCTION   BotBound
( c:CRITERIA ) :REAL ;

Description:

Returns the y-coordinate of the bounding box (bottom right corner) of an object matching the search criteria. If more than one object matches the search criteria, the function will return the bottom value of the last matching object found.

Parameters:

c Search criteria.

Example:

BotBValue:=BotBound(N='MyRect');



  Count Criteria 

Declaration:

FUNCTION   Count
( c:CRITERIA ) :LONGINT ;

Description:

Counts all of the objects which match the search criteria.

Parameters:

c Search criteria.

Example:

CountValue := Count((FP=4)and(T='Rect'));
{counts all rectangles with a fillpat index of 4}



  CriteriaArea Criteria 

Declaration:

FUNCTION   CriteriaArea
( c:CRITERIA ) :REAL ;

Description:

Returns the area of an object. If more than one object matches the search criteria, the function will return the sum of all the matching object areas.

Parameters:

c Search criteria.

Example:

totalA:=Area((C='Plywood')and(L='First'));
{returns the area of all objects in class 'Plywood' on layer 'First'}



  CriteriaSurfaceArea Criteria 

Declaration:

FUNCTION   CriteriaSurfaceArea
( c:CRITERIA ) :REAL ;

Description:

Returns the surface area of the items matching the specified criteria. If more than one object matches the search criteria, the sum of all the surface areas of the matching objects will be returned.

CriteriaSurfaceArea will return only return areas on objects which support the solids modelling functions.

Parameters:

c Search criteria.

Example:

totalArea:=CriteriaSurfaceArea((C='Empty Space'));



  CriteriaVolume Criteria 

Declaration:

FUNCTION   CriteriaVolume
( c:CRITERIA ) :REAL ;

Description:

Returns the volume of the items matching the specified criteria. If more than one object matches the search criteria, the sum of all the volumes of the matching objects will be returned.

CriteriaVolume will return only return volumes on objects which support the solids modelling functions.

Parameters:

c Search criteria.

Example:

totalVol:=CriteriaVolume((C='Empty Space'));



  DSelectObj Criteria 

Declaration:

PROCEDURE   DSelectObj
( c:CRITERIA ) ;

Description:

Deselects all objects which match the search criteria.

Parameters:

c Search criteria.

Example:

DSelectObj(S='Pine Tree');
{deselects all 'Pine Tree' symbols}



  EditProperties Criteria 

Declaration:

PROCEDURE   EditProperties
( c:CRITERIA ) ;

Description:

Displays the 'Properties' dialog for all objects matching the specified search criteria

Parameters:

c Search criteria.



  Eval Criteria 

Declaration:

FUNCTION   Eval
(   h :HANDLE;
    c :CRITERIA
) :REAL ;

Description:

Evaluates whether an object meets the specified search criteria.

When used with record criteria, it will determine whether a specific record is attached to the object; if used with record-field criteria, it will return the value of the field as a REAL value.


Parameters:

h Handle of object to which the search criteria will be applied.
c Search criteria.

Result:

If the criteria is a record-field criteria, the procedure will return the value contained within the field. All other criteria return the TRUE-FALSE state of the criteria condition.

Example:

hasRecord:=Eval(handleToObject,(R IN ['Part Info']);



  EvalStr Criteria 

Declaration:

FUNCTION   EvalStr
(   h :HANDLE;
    c :CRITERIA
) :STRING ;

Description:

Evaluates whether an object meets the specified search criteria.

When used with record criteria, it will determine whether a specific record is attached to the object; if used with record-field criteria, it will return the value of the field as a STRING.

Parameters:

h Handle of object to which the search criteria will be applied.
c Search criteria.

Result:

If the criteria is a record-field criteria, the procedure will return the value contained within the field. All other criteria return the TRUE-FALSE state of the criteria condition.

Example:

dataValue:= EvalStr(handleToObject,('Part Info'.'Serial No.'));



  ForEachObject Criteria 

Declaration:

PROCEDURE   ForEachObject
(   callback :PROCEDURE;
    c :CRITERIA
) ;

Description:

Calls a user defined procedure to operate on each object matching the specified search criteria.

The procedure subroutine specified by the callback parameter must have one parameter of type HANDLE, which is passed the handle to an object by the ForEachObject call.

Parameters:

callback Name of action procedure to be applied to matching objects
c Search criteria for locating objects.

Example:

PROCEDURE PickRect;

PROCEDURE SelectThem(h :HANDLE);
BEGIN
	SetSelect(h);
END;

BEGIN
	ForEachObject(SelectThem, T=RECT);
END;
RUN(PickRect);



  Height Criteria 

Declaration:

FUNCTION   Height
( c:CRITERIA ) :REAL ;

Description:

Returns the height of an object. If more than one object matches the search criteria, the function will return the sum of all the matching object heights.

Parameters:

c Search criteria.

Example:

HeightValue:=Height(N='North Wall');



  Hide Criteria 

Declaration:

PROCEDURE   Hide
( c:CRITERIA ) ;

Description:

Hides any visible or grayed objects matching the specified search criteria.

Parameters:

c Search criteria.

Example:

Hide((C='Proposed Phase 2 Construction'));



  IsFlipped Criteria 

Declaration:

FUNCTION   IsFlipped
( c:CRITERIA ) :REAL ;

Description:

Returns the number of objects meeting the criteria that are flipped.

Parameters:

c Search criteria.

Example:

PROCEDURE CountFlippedDoorSymbols;
BEGIN
  Message(IsFlipped(S='*Door*'));
END;
RUN(CountFlippedDoorSymbols);

See Also:

IsObjectFlipped  



  LeftBound Criteria 

Declaration:

FUNCTION   LeftBound
( c:CRITERIA ) :REAL ;

Description:

Returns the x-coordinate of the bounding box (top left corner) of an object matching the search criteria. If more than one object matches the search criteria, the function will return the left value of the last matching object found.

Parameters:

c Search criteria.

Example:

LeftBValue:=LeftBound(N='MyRect');



  Length Criteria 

Declaration:

FUNCTION   Length
( c:CRITERIA ) :REAL ;

Description:

Returns the length of an object. If more than one object matches the search criteria, the function will return the sum of all the matching object lengths.

Parameters:

c Search criteria.

Example:

LengthValue:=Length(C='CrossMembers');
{returns the length of all objects in class 'CrossMembers'}



  ObjectType Criteria 

Declaration:

FUNCTION   ObjectType
( c:CRITERIA ) :INTEGER ;

Description:

Returns the type identifier an object. If more than one object matches the search criteria, the type identifier of the last matching object will be returned.


Parameters:

c Search criteria.

Example:

TypeValue:=ObjectType(N='Mystery Object');
{returns the type of the object named 'Mystery Object'}



  Perim Criteria 

Declaration:

FUNCTION   Perim
( c:CRITERIA ) :REAL ;

Description:

Returns the perimeter of an object. If more than one object matches the search criteria, the function will return the sum of the matching objects' perimeters.

Parameters:

c Search criteria.

Example:

PerimValue := Perim(C='Fence');
{returns the total perimeter of all objects in the class 'Fence'}



  RightBound Criteria 

Declaration:

FUNCTION   RightBound
( c:CRITERIA ) :REAL ;

Description:

Returns the x-coordinate of the bounding box (bottom right corner) of an object matching the search criteria If more than one object matches the search criteria, the function will return the sum of the coordinates of all the matching objects.

Parameters:

c Search criteria.

Example:

RightBValue:=RightBound(N='MyRect');



  RoofArea_Heated Criteria 

Declaration:

FUNCTION   RoofArea_Heated
( c:CRITERIA ) :REAL ;

Description:

Returns the heated (interior) area along the slope of roofs or roof faces that meet the criteria.



  RoofArea_HeatedProj Criteria 

Declaration:

FUNCTION   RoofArea_HeatedProj
( c:CRITERIA ) :REAL ;

Description:

Returns the heated (interior) area projected on the ground plane of roofs or roof faces that meet the criteria.



  RoofArea_Total Criteria 

Declaration:

FUNCTION   RoofArea_Total
( c:CRITERIA ) :REAL ;

Description:

Returns the total area along the slope of roofs or roof faces that meet the criteria.



  RoofArea_TotalProj Criteria 

Declaration:

FUNCTION   RoofArea_TotalProj
( c:CRITERIA ) :REAL ;

Description:

Returns the total area projected on the ground plane of roofs or roof faces that meet the criteria.



  SelectObj Criteria 

Declaration:

PROCEDURE   SelectObj
( c:CRITERIA ) ;

Description:

Selects all objects which match the search criteria.

Parameters:

c Search criteria.

Example:

PROCEDURE Example;
VAR
	red, green, blue, color :LONGINT;
	criteria :STRING;
BEGIN
	red := 65535;
	green := 0;
	blue := 0;
	RGBToColorIndex(red, green, blue, color);
	Rect(0, 0, 1, 1);
	SetPenFore(LNewObj, color);
	DSelectAll;
	criteria := Concat('(INSYMBOL & INVIEWPORT & (PF=', color, '))');
	SelectObj(criteria);
	Message(criteria);
END;
RUN(Example);



  Show Criteria 

Declaration:

PROCEDURE   Show
( c:CRITERIA ) ;

Description:

Displays any hidden or grayed objects matching the specified search criteria.

Parameters:

c Search criteria.

Example:

Show((C='Proposed Phase 2 Construction'));



  SlabThickness Criteria 

Declaration:

FUNCTION   SlabThickness
( c:CRITERIA ) :REAL ;

Description:

Returns the thickness of slab objects that meet the criteria.



  SurfaceArea Criteria 

Declaration:

FUNCTION   SurfaceArea
( c:CRITERIA ) :REAL ;

Special Notes:

SurfaceArea is obsolete as of VectorWorks12.5

Description:

Returns the surface area of the items matching the specified criteria. If more than one object matches the search criteria, the sum of all the surface areas of the matching objects will be returned.

SurfaceArea will return only return areas on objects which support the solids modelling functions.

Parameters:

c Search criteria.

Example:

totalArea:=SurfaceArea((C='Empty Space'));



  TopBound Criteria 

Declaration:

FUNCTION   TopBound
( c:CRITERIA ) :REAL ;

Description:

Returns the y-coordinate of the bounding box (top left corner) of an object matching the search criteria. If more than one object matches the search criteria, the function will return the sum of the coordinates of all the matching objects.

Parameters:

c Search criteria.

Example:

TopBValue:=TopBound(N='MyRect');



  Volume Criteria 

Declaration:

FUNCTION   Volume
( c:CRITERIA ) :REAL ;

Special Notes:

Volume is obsolete as of VectorWorks12.5

Description:

Returns the volume of the items matching the specified criteria. If more than one object matches the search criteria, the sum of all the volumes of the matching objects will be returned.

Volume will return only return volumes on objects which support the solids modelling functions.

Parameters:

c Search criteria.

Example:

totalVol:=Volume((C='Empty Space'));



  WallArea_Gross Criteria 

Declaration:

FUNCTION   WallArea_Gross
( c:CRITERIA ) :REAL ;

Description:

Returns the 2D gross surface area of walls that meet the criteria.



  WallArea_Net Criteria 

Declaration:

FUNCTION   WallArea_Net
( c:CRITERIA ) :REAL ;

Description:

Returns the 2D gross surface area without doors and windows areas of walls that meet he criteria.



  WallAverageHeight Criteria 

Declaration:

FUNCTION   WallAverageHeight
( c:CRITERIA ) :REAL ;

Description:

Returns the average height of walls, including wall peaks and different starting and ending heights.



  WallThickness Criteria 

Declaration:

FUNCTION   WallThickness
( c:CRITERIA ) :REAL ;

Description:

Returns the thickness of walls that meet the criteria.



  Width Criteria 

Declaration:

FUNCTION   Width
( c:CRITERIA ) :REAL ;

Description:

Returns the width of an object matching the search criteria. If more than one object matches the search criteria, the function will return the sum of the matching object widths.

Parameters:

c Search criteria.

Example:

WidthValue:=Width(N='Box');



  XCenter Criteria 

Declaration:

FUNCTION   XCenter
( c:CRITERIA ) :REAL ;

Description:

Returns the x-coordinate of the center point of an object matching the serach criteria. If more than one object matches the search criteria, the function will return the sum of the coordinates of all the matching objects.

Parameters:

c Search criteria.

Example:

XCenValue:=XCenter(N='Board');
{returns the x-coord of the center of the named object 'Board'}



  YCenter Criteria 

Declaration:

FUNCTION   YCenter
( c:CRITERIA ) :REAL ;

Description:

Returns the y-coordinate of the center point of an object matching the serach criteria. If more than one object matches the search criteria, the function will return the sum of the coordinates of all the matching objects.

Parameters:

c Search criteria.

Example:

YCenValue:=YCenter(N='Board');
{returns the y-coord of the center of the named object 'Board'}



  ZCenter Criteria 

Declaration:

FUNCTION   ZCenter
( c:CRITERIA ) :REAL ;

Description:

Returns the z-coordinate value of the center of an object matching the search criteria.