VCFirstOnScreen


Version:

1.2

Description:

Locates the first entity in the current zoom and makes it current.

Declaration:

 

C/C++

extern "C" vbool WINAPI VCFirstOnScreen(short* iError, short* bKind);

Delphi

function VCFirstOnScreen (var iError: Smallint; var bKind: Smallint): WordBool; stdcall;

ActiveX/COM

Function FirstOnScreen() As Integer

Parameters:

bKind - set by the function to what type of entity is now current.

Return Value:

0 if not successful and 1 otherwise.
ActiveX/COM returns the entity kind (UNKNOWN if not successful)

iError Code:

0 - Success
1 - Invalid world

Notes:

Whenever querying entities for their particular properties, it is necessary to have a method to step through the drawing database and select which entity a given query will focus on. The API offers several utility parsing methods for flexibility in locating entities in the database. Each offers advantages in certain situations. VCFirst/NextEntity moves to the first entity in the database and then to each entity in the drawing database. VCFirst/NextEntityExpand parses the database as if the drawing file had been exploded. Every entity, including those in symbol definitions and hatch patterns are included in the VCFirst/NextEntityExpand search. VCFirst/NextOnScreen clips the drawing and allows for quick entity access to only those entities found on the screen at the present time. VCFirst/NextSelected parses only through the selection set. This method combined with a selection filter allow access to specific entities meeting a set of criteria quickly in the drawing database. If no entities exist for the method, the return value will be 0.

The VCFirst/Next functions operate relative to the current entity. If code which uses VCFirst/Next in a loop changes the current entity, it is important that the current entity be reset to the entity returned by the previous VCFirst/Next call.

See Also:

VCNextEntity, VCLastEntity, VCFirstEntityExpand, VCNextEntityExpand, VCFirstEntity, VCNextOnScreen, VCFirstSelected, VCNextSelected, VCSetCurrentEntity