[每日一码] 从线型定义文件中加载指定线型的代码
void LoadLinetype( const ACHAR *linetypeName, const ACHAR *filename ){
AcDbLinetypeTable *pLinetypeTbl;
AcDbObjectId LineId;
acdbCurDwg()->getLinetypeTable( pLinetypeTbl, AcDb::kForRead );
if ( (pLinetypeTbl->getAt( linetypeName, LineId )) != Acad::eOk );
{
pLinetypeTbl->close();
acutPrintf( 采用T("\n %s"), filename);
if ( (acdbCurDwg()->loadLineTypeFile( linetypeName, filename )) == Acad::eOk )
acutPrintf( 采用T("\nLinetype [%s] loaded. "), linetypeName );
}
}
页:
[1]