icc 发表于 2002-6-5 10:12:00

[讨论]如何往一个AcDbDataBase里加线型?

比如New了一个DataBase,想添加线型DASHED,如何做?

wxj351 发表于 2002-6-9 22:42:00

程序见内

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]
查看完整版本: [讨论]如何往一个AcDbDataBase里加线型?