[讨论]如何往一个AcDbDataBase里加线型?
比如New了一个DataBase,想添加线型DASHED,如何做?程序见内
AcDbLinetypeTable *pLinetypeTable;AcDbObjectId Id;
acdbHostApplicationServices()->workingDatabase()
->getSymbolTable(pLinetypeTable, AcDb::kForRead);
if(pLinetypeTable->getAt("DASHED",Id)!=Acad::eOk){
pLinetypeTable->close();
acdbHostApplicationServices()->workingDatabase()
->loadLineTypeFile("DASHED","acadiso.lin");
}else{
acutPrintf("\nDASHED线型已装入");
}
if(pLinetypeTable->getAt("DASHDOT",Id)!=Acad::eOk){
acdbHostApplicationServices()->workingDatabase()
->loadLineTypeFile("DASHDOT","acadiso.lin");
}else{
acutPrintf("\nDASHDOT线型已装入");
}
if(pLinetypeTable->getAt("DIVIDE",Id)!=Acad::eOk){
acdbHostApplicationServices()->workingDatabase()
->loadLineTypeFile("DIVIDE","acadiso.lin");
}else{
acutPrintf("\nDIVIDE线型已装入");
}
pLinetypeTable->close();
页:
[1]