在ObjectArx中如何加载除"CONTINUOUS"之外的线型?
在ObjectArx中如何加载除"CONTINUOUS"之外的线型? 这个你必须先载入线型文件. #define CommandB() { struct resbuf rB_cmd,rB_usr; \<BR> acedGetVar("CMDECHO", &rB_cmd); \<BR> rB_usr.restype = RTSHORT; \<BR> rB_usr.resval.rint = (int) (0); \<BR> acedSetVar("CMDECHO", &rB_usr); <BR>#define CommandE() acedSetVar("CMDECHO", &rB_cmd); \<BR>};//添加新线形<BR>bool addNewLineType(char *linetypename)<BR>{<BR> AcDbLinetypeTable *pLinetypeTbl;<BR> bool flag1=true;<BR> acdbHostApplicationServices()->workingDatabase()<BR> ->getSymbolTable(pLinetypeTbl, AcDb::kForRead);<BR> if(!pLinetypeTbl->has(linetypename)) flag1=false;<BR> pLinetypeTbl->close();<BR> if(!flag1)<BR> {<BR> CommandB();<BR> if(acedCommand(RTSTR,"LINETYPE",RTSTR,"L",RTSTR,linetypename,RTSTR,"",RTSTR,"",0)!=RTNORM) <BR> acutPrintf("\n 调入线型%s时出现错误!",linetypename);<BR> CommandE();<BR> return false;<BR> }<BR> <BR> return true;<BR>} es=acdbLoadLineTypeFile("HIDDEN","ACADISO.LIN",acdbHostApplicationServices()->workingDatabase()); 这两个哪个好点?
页:
[1]