以下代码从数据库中获取图层符号表,创建新的图层表记录,并将其命名为 (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(); } |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:07
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.