Code sample Home

Create a shape entity from marked entities
void DemoShape6 (HANDLE hLcWnd)
{
  HANDLE hBlock, hShape, hEnt;

  // get a block, linked with CAD window
  hBlock = lcPropGetHandle( hLcWnd, LC_PROP_WND_BLOCK );
  // add Shape entity
  hShape = lcBlockAddShape( hBlock );
  hEnt = lcBlockGetEntByKey( hBlock, 1 );
  if (hEnt){
    lcShapeAddEnt( hShape, hEnt, true );
  }
  hEnt = lcBlockGetEntByKey( hBlock, 2 );
  if (hEnt){
    lcShapeAddEnt( hShape, hEnt, true );
  }
  hEnt = lcBlockGetEntByKey( hBlock, 3 );
  if (hEnt){
    lcShapeAddEnt( hShape, hEnt, true );
  }
  lcShapeEnd( hShape );

  // set solid filling
  lcPropPutBool( hShape, LC_PROP_ENT_SOLIDFILL, true );
  lcPropPutStr( hShape, LC_PROP_ENT_FCOLOR, L"0,255,0" );
  // disable border line
  lcPropPutInt( hShape, LC_PROP_ENT_LWIDTH, 0 );
  // redraw view
  lcWndRedraw( hLcWnd );
}
See Also:

Create shape entity from selected entities ,
Create shape entity from marked entities 2