TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 昨天 15:23 |
---|
签到天数: 69 天 [LV.6]常住居民II
管理员
- 积分
- 2704
|
static void AddLayer(const TCHAR* layerName, int colorIndex)
{
assert (layerName != NULL);
assert (colorIndex >= 1 && colorIndex <= 255);
AcDbLayerTable *pLayerTbl = NULL;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pLayerTbl, AcDb::kForWrite);
if (!pLayerTbl->has(layerName))
{
AcDbLayerTableRecord *pLayerTblRcd = new AcDbLayerTableRecord();
pLayerTblRcd->setName(layerName);
AcCmColor color;
color.setColorIndex(colorIndex);
pLayerTblRcd->setColor(color);
Acad::ErrorStatus es = pLayerTbl->add(pLayerTblRcd);
pLayerTblRcd->close();
}
pLayerTbl->close();
}
|
|