ObjectARX, AutoCAD. Среда программирования библиотеки C++

Создание Нового Уровня


Следующий код получает таблицу идентификаторов уровня от базы данных, создает новую запись таблицы уровня ASDK_MYLAYER.

void

createNewLayer()

{

AcDbLayerTable *pLayerTable;

acdbHostApplicationServices()->workingDatabase()

->getSymbolTable(pLayerTable, AcDb::kForWrite);

AcDbLayerTableRecord *pLayerTableRecord =

new AcDbLayerTableRecord;

pLayerTableRecord->setName("ASDK_MYLAYER");

// Defaults are used for other properties of

// the layer if they are not otherwise specified.

//

pLayerTable->add(pLayerTableRecord);

pLayerTable->close();

pLayerTableRecord->close();

}



Содержание раздела