VCGetCurrentEntityHandle


Version:

1.2

Description:

Retrieves a Visual CADD™ entity handle so it may be retrieved at a later time.

Declaration:

 

C/C++

extern "C" ENTITYHANDLE WINAPI VCGetCurrentEntityHandle(short* iError);

Delphi

function VCGetCurrentEntityHandle(var iError: Smallint):Long; stdcall;

ActiveX/COM

Function GetCurrentEntityHandle() As Long

Parameters:

Returns - the Visual CADD™ entityhandle for the desired entity.

Notes:

The current entity is set with VCSetCurrentEntity, VCFirstEntity or VCNextEntity. Each entity in Visual CADD™ 2.0 maintains a unique entity identifier (VCGetCurrentEntityUID) in order to track the entity. This is in addition to the dynamic entity handle (VCGetCurrentEntityHandle) which changes as entities are deleted and modified in the database. As entities are added to the drawing, both an entity handle and a UID are assigned to the entity. The entity handle will change as items are deleted and modified on the database while the UID will remain constant. Whenever linking entities to external databases or arrays, the application should utilize the UID due to its unchanging value with each entity. The entity handle is used when parsing the database or setting specific entities within the drawing session. The UID can and should be audited prior to any external storage in order to ensure uniqueness in the ID.

See Also:

VCGetCurrentEntityColor, VCGetCurrentEntityUID, VCGetCurrentEntityKind, VCGetCurrentEntityLayer, VCGetCurrentEntityLayerName, VCGetCurrentEntityLineType, VCGetCurrentEntityLineWidth, VCGetCurrentEntityLineWidthValue, VCLastEntity, VCSetCurrentEntity