Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to remove/purge layers in the drawing programmatically?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
jlobo2
673 Views, 1 Reply

How to remove/purge layers in the drawing programmatically?

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

 

 

1 REPLY 1
Message 2 of 2
pendean
in reply to: jlobo2

LAYDEL command or repost in the customization forums for code help.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost