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