Message 1 of 2
Delete layer problem
Not applicable
09-21-2005
03:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi I am able to delete layer successfully using my code as below
AcDbLayerTable *pTable = 0;
Acad::ErrorStatus es = acdbCurDwg()->getLayerTable(pTable,
AcDb::kForRead);
if(es == Acad::eOk)
{
AcDbLayerTableRecord *pRec = 0;
if(pTable->has("LAYER TO DELETE"))
{
if(pTable->getAt("LAYER TO DELETE", pRec, AcDb::kForWrite) == Acad::eOk)
{
pRec->erase();
pRec->close();
}
}
pTable->close();
}
after delete i am calling applyCurDwgLayerTableChanges() function as well.
My problem is the name of deleted layer remains there in Layer Manager Combo box / Dialog.
How to remove this layer entry.
thanks in advance.
Best regards,
Santosh
AcDbLayerTable *pTable = 0;
Acad::ErrorStatus es = acdbCurDwg()->getLayerTable(pTable,
AcDb::kForRead);
if(es == Acad::eOk)
{
AcDbLayerTableRecord *pRec = 0;
if(pTable->has("LAYER TO DELETE"))
{
if(pTable->getAt("LAYER TO DELETE", pRec, AcDb::kForWrite) == Acad::eOk)
{
pRec->erase();
pRec->close();
}
}
pTable->close();
}
after delete i am calling applyCurDwgLayerTableChanges() function as well.
My problem is the name of deleted layer remains there in Layer Manager Combo box / Dialog.
How to remove this layer entry.
thanks in advance.
Best regards,
Santosh