<?xml encoding=”UTF-8″>By Gopinath Taget
If you would like entity handle values of entities to start from a specific value, you can use the AcDbDatabase::setHandseed() method. The following code forces handle values to start at 1000.
Note that setting Handseed to a value less than the largest handle in the drawing will prevent entities being added to that drawing and serious problems could occur. To get the current available handle, you can use the AcDbDatabase::handseed method.
<div><p><span><font face="Consolas"><font color="#000000">AcDbDatabase * pDb = acdbHostApplicationServices()->workingDatabase();</font></font></span></p><p><span><font face="Consolas"><font color="#000000">AcDbHandle hand(1000);</font></font></span></p><p><span><font face="Consolas"><font color="#000000">Acad::ErrorStatus es = pDb->setHandseed(hand);</font></font></span></p></div>

Leave a Reply to Montalto GlazeCancel reply