HuaiYu 发表于 2006-2-12 22:57:00

[求助]在ARX中怎么加载线型?

<P>请教一个小问题,在ARX怎么加载一个线型</P>
<P>比如:在现有的表中没有 “center”线型,那怎么加载进来呢?</P>

lilq_78 发表于 2006-2-14 10:22:00

bool addnewlinetype(char *linetype)<BR>{<BR>&nbsp;AcDbLinetypeTable *pLinetypeTbl;<BR>&nbsp;bool flag1=true;<BR>&nbsp;&nbsp;&nbsp; acdbHostApplicationServices()-&gt;workingDatabase()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;getSymbolTable(pLinetypeTbl, AcDb::kForRead);<BR>&nbsp;if(!pLinetypeTbl-&gt;has(linetype)) flag1=false;<BR>&nbsp;&nbsp;&nbsp; pLinetypeTbl-&gt;close();<BR>&nbsp;if(!flag1)<BR>&nbsp;{<BR>&nbsp;&nbsp;<BR>&nbsp; if(acedCommand(RTSTR,"LINETYPE",RTSTR,"L",RTSTR,linetype,RTSTR,"",RTSTR,"",0)!=RTNORM) <BR>&nbsp;&nbsp; acutPrintf("\n 调入线型%s时出现错误!",linetype);<BR>&nbsp;&nbsp;&nbsp; return false;<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;return true;<BR>}

HuaiYu 发表于 2006-2-14 21:53:00

谢谢了,<A name=83421><FONT color=#000066><B>lilq_78</B></FONT></A> 。
页: [1]
查看完整版本: [求助]在ARX中怎么加载线型?