Quantcast
Channel: Autodesk AutoCAD forums
Viewing all articles
Browse latest Browse all 14319

How to remove/purge layers in the drawing programmatically?

$
0
0

Hello All,

 

Currently we add layers to the drawing using the AcDbLayerTable and the AcDbLayerTableRecord Class, in the following way

 

AcDbLayerTable *pLayerTbl;

AcDbLayerTableRecord *pTempRecord;

pLayerTbl = NULL;

pTempRecord = NULL;

theDb->getSymbolTable(pLayerTbl,AcDb::kForWrite);

 

// Add INFO Layer

pTempRecord = newAcDbLayerTableRecord;

pTempRecord->setName(_T("INFO"));

pTempRecord->setIsFrozen(Adesk::kFalse);

....................

....................

....................

pTempRecord->close();

pTempRecord = NULL;

 

pLayerTbl->close();

 

Am, wondering if there is a way where we can delete/purge the layers from the drawing programmatically?

 

Any help or guidance will be of great help.


Thanks

Jo

 

 


Viewing all articles
Browse latest Browse all 14319

Trending Articles