GetNearestEntity

  Functions >

GetNearestEntity

Previous pageReturn to chapter overviewNext page

The GetNearestEntity function determines the point that is nearest to the mouse cursor position.

 

Syntax:

 

int GetNearestEntity(

  HANDLE hObject,

  LPCSTR NearestEntityName,

  DWORD nSize,

  LPRECT R,

  LPPOINT APoint

);

 

 

Parameters:

 

hObject

Identifies the CADImage object handle.

NearestEntityName

Contains the name of the closest entity after calling GetNearestEntity function.

nSize

Specifies size of the buffer NearestEntityName for a name of the closest entity.

R

Specifies the RECT structure that contains the logical coordinates of the drawing rectangle.

APoint

Specifies the point relative to which search will be implemented.

 

 

Return Value:

If the function succeeds, the return value is 3.

If the function fails, the return value is zero. To get extended error information, call GetLastErrorCAD.

 

 

Note:

After executing the GetNearestEntity function APoint contains the closest knot point of the entity returned in NearestEntityName.

 

 

See Also

CADCreate  | GetNearestEntityWCS


© 2003-2024 CADSoftTools

Go to CAD DLL