BOOL Additional_Class::Get_LineTypeID( CString linetype, AcDbObjectId &linetypeid ) { AcDbLinetypeTable *pLtpTbl; acdbHostApplicationServices()->workingDatabase()->getLinetypeTable(pLtpTbl,AcDb::kForRead); if (!pLtpTbl->has((linetype ))) { pLtpTbl->close(); return FALSE; } pLtpTbl->getAt(linetype, linetypeid); pLtpTbl->close(); return TRUE; }
static Acad::ErrorStatus GetLinetypeId(const CString& linetype, AcDbObjectId &linetypeId) { AcDbLinetypeTable *pLtpTbl; acdbHostApplicationServices()->workingDatabase()->getLinetypeTable(pLtpTbl, AcDb::kForRead); if (!pLtpTbl->has(linetype)) { pLtpTbl->close(); return Acad::eBadLinetypeName; } pLtpTbl->getAt(linetype, linetypeId); pLtpTbl->close(); return Acad::eOk; }
BOOL Additional_Class::Add_LineType( CString linetype ) { AcDbLinetypeTable *pLtpTbl; acdbHostApplicationServices()->workingDatabase()->getLinetypeTable(pLtpTbl,AcDb::kForRead); if (pLtpTbl->has((linetype ))) { pLtpTbl->close(); return TRUE; } pLtpTbl->close(); Acad::ErrorStatus es; es = acdbHostApplicationServices()->workingDatabase()->loadLineTypeFile(linetype, _T("ZWCADiso.lin")); return TRUE; }