- 积分
- 403
- 明经币
- 个
- 注册时间
- 2003-4-12
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-5-10 08:07:00
|
显示全部楼层
#define CommandB() { struct resbuf rB_cmd,rB_usr; \ acedGetVar("CMDECHO", &rB_cmd); \ rB_usr.restype = RTSHORT; \ rB_usr.resval.rint = (int) (0); \ acedSetVar("CMDECHO", &rB_usr); #define CommandE() acedSetVar("CMDECHO", &rB_cmd); \ };
//添加新线形 bool addNewLineType(char *linetypename) { AcDbLinetypeTable *pLinetypeTbl; bool flag1=true; acdbHostApplicationServices()->workingDatabase() ->getSymbolTable(pLinetypeTbl, AcDb::kForRead); if(!pLinetypeTbl->has(linetypename)) flag1=false; pLinetypeTbl->close(); if(!flag1) { CommandB(); if(acedCommand(RTSTR,"LINETYPE",RTSTR,"L",RTSTR,linetypename,RTSTR,"",RTSTR,"",0)!=RTNORM) acutPrintf("\n 调入线型%s时出现错误!",linetypename); CommandE(); return false; } return true; } |
|