Angle Criteria 

Declaration:

FUNCTION   Angle
( c:CRITERIA ) :REAL ;

Description:

Function Angle 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 ;

Description:

Function Area returns the area of an object. If more than one object matches the search criteria, the function will return the sum of the matching objects' 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:

Function BotBound returns the bottom (y) value of the object's lower right corner. 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:

Function Count counts all of the objects which match the search criteria provided.

Parameters:

c Search criteria.

Example:

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



  DSelectObj Criteria 

Declaration:

PROCEDURE   DSelectObj
( c:CRITERIA ) ;

Description:

Procedure DSelectObj deselects all objects which match the search criteria.

Parameters:

c Search criteria.

Example:

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



  Eval Criteria 

Declaration:

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

Description:

Function Eval is used with search criteria to evaluate whether the specified object specified meets the 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 the 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(1)-FALSE(0) state of the criteria condition

Example:

HasRecord:=Eval(HandleToObject,(R IN ['Part Info']);



  EvalStr Criteria 

Declaration:

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

Description:

Function EvalStr is used with search criteria to evaluate whether the specified object specified meets the 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 the 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:

Procedure ForEachObject repeatedly calls a user defined procedure to operate on each object matching the specified search criteria. Parameter callback specifies the procedure to be called, and parameter c specifies the criteria on which the search will be performed.

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.

Example:

PROCEDURE PickRect;
 PROCEDURE Pick(H : HANDLE);
 BEGIN
  SetSelect(H);
 END;
BEGIN
 ForEachObject(Pick, T=RECT);
END;
Run(PickRect);
{selects all rectangles}



  GetHandle Criteria 

Declaration:

FUNCTION   GetHandle
( c:CRITERIA ) :HANDLE ;

Special Notes:

GetHandle is obsolete as of VectorWorks 8.0

Description:

Obsolete procedure.

Parameters:

c Search criteria.



  Height Criteria 

Declaration:

FUNCTION   Height
( c:CRITERIA ) :REAL ;

Description:

Function Height returns the height of an object. If more than one object matches the search criteria, the function will return the sum of the matching objects' heights.

Parameters:

c Search criteria.

Example:

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



  Hide Criteria 

Declaration:

PROCEDURE   Hide
( c:CRITERIA ) ;

Description:

Procedure Hide makes objects matching the specified search criteria invisible if they are not already so.

Parameters:

c Search criteria.

Example:

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



  IsFlipped Criteria 

Declaration:

FUNCTION   IsFlipped
( c:CRITERIA ) :REAL ;

Description:

Function IsFlipped returns TRUE if the object matching the specified criteria (such as a symbol) is flipped. Only certain types of objects can be flipped.

Parameters:

c Search criteria.

Example:

flipState:=IsFlipped((N='Mystery Object'));



  LeftBound Criteria 

Declaration:

FUNCTION   LeftBound
( c:CRITERIA ) :REAL ;

Description:

Function LeftBound returns the left bound (x) value of the object's upper left corner. 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:

Function Length returns the length of an object. If more than one object matches the search criteria, the function will return the sum of the matching objects' 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:

Function ObjectType returns the objects' type identifier. 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:

Function Perim 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:

Function RightBound returns the right (x) value of the object's lower right corner. If more than one object matches the search criteria, the function will return the right value of the last matching object found.

Parameters:

c Search criteria.

Example:

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



  SelectObj Criteria 

Declaration:

PROCEDURE   SelectObj
( c:CRITERIA ) ;

Description:

Procedure SelectObj selects all objects which match the search criteria.

Parameters:

c Search criteria.

Example:

SelectObj(C='Brick');



  Show Criteria 

Declaration:

PROCEDURE   Show
( c:CRITERIA ) ;

Description:

Procedure Show makes objects matching the specified search criteria visible if they are not already so.

Parameters:

c Search criteria.

Example:

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



  SurfaceArea Criteria 

Declaration:

FUNCTION   SurfaceArea
( c:CRITERIA ) :REAL ;

Description:

Function SurfaceArea returns the surface area of the items matching the specified criteria. If more than one object matches the search criteria, SurfaceArea will return the sum of all the surface areas of the matching objects.

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:

Function TopBound returns the top (y) value of the object's upper left corner. If more than one object matches the search criteria, the function will return the top value of the last matching object found.

Parameters:

c Search criteria.

Example:

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



  Volume Criteria 

Declaration:

FUNCTION   Volume
( c:CRITERIA ) :REAL ;

Description:

Function Volume returns the volume of the items matching the specified criteria. If more than one object matches the search criteria, Volume will return the sum of all the volumes of the matching objects.

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

Parameters:

c Search criteria.

Example:

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



  Width Criteria 

Declaration:

FUNCTION   Width
( c:CRITERIA ) :REAL ;

Description:

Function Width returns the width of an object. If more than one object matches the search criteria, the function will return the sum of the matching objects' widths.

Parameters:

c Search criteria.

Example:

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



  XCenter Criteria 

Declaration:

FUNCTION   XCenter
( c:CRITERIA ) :REAL ;

Description:

Function XCenter returns the x coordinate of the center point of the object. If more than one object matches the search criteria, the function will return the x coordinate of the center point of the last matching object found.

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:

Function YCenter returns the y coordinate of the center point of the object. If more than one object matches the search criteria, the function will return the y coordinate of the center point of the last matching object found.


Parameters:

c Search criteria.

Example:

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