SelectShapeByCode

<< Click to Display Table of Contents >>

Navigation:  TMyCAD > Methods >

SelectShapeByCode

function SelectShapeByCode(ShapeId:integer;RemovePrevSelectedShape:boolean=true): Boolean;

 

 

Description:

 

Select a shape by code like mouse actions. Use this function if, for example, you want to perform operations on a certain shape, which require the use of GetSelectedShapeId, if RemovePrevSelectedShape is true, do not clear last selected shape hot spot.

 

 

 

Return value:

true: the shape is selected

 false: there is no shape with this Id,

 

Notes:

 

if the shape is grouped with other shapes, the hotspot for that group appear.

This function can effect the GetSelectedShapeId

 

Examples:

 

   MyCAD1.SelectShapeByCode(2);

 

See also:

 

SelectAllShapes

SelectAllShapesByLayerId