[ARX]请高手们指点一下
<P>如果知道两点坐标</P><P>用ARX如何实现尺寸标注?可以的话给个程序段源码。</P>
<P>在线等,请高手们指点</P>
<P>另外,我下面的函数写出的字体的宽度系数和设置的宽度系数不一致,其他没问题</P>
<P>请帮忙看一下,哪里有问题,谢谢!</P>
<P>Acad::ErrorStatus es;<BR> AcDbTextStyleTable *pTsTable;</P>
<P> es = curDoc()->database()->getSymbolTable(pTsTable,AcDb::kForRead);<BR> if (es != Acad::eOk)<BR> {<BR> AfxMessageBox("Couldn't get the text style table.");<BR> }</P>
<P> CString theFont = "宋体";</P>
<P> if (!pTsTable->has((LPTSTR)(LPCSTR)theFont))<BR> {<BR> AcDbTextStyleTableRecord *pStyle = new AcDbTextStyleTableRecord;</P>
<P> pStyle->setFont((LPTSTR)(LPCTSTR)theFont,Adesk::kFalse,Adesk::kFalse,0,34);<BR> pStyle->setFileName(theFont);<BR> pStyle->setBigFontFileName(theFont);</P>
<P> pStyle->setTextSize(8);<BR> pStyle->setXScale(0.3);<BR> pStyle->setObliquingAngle(0);<BR> pStyle->setName(theFont);<BR> pStyle->setIsShapeFile(Adesk::kFalse);<BR> pStyle->setIsVertical(Adesk::kFalse);</P>
<P> pTsTable->upgradeOpen();<BR> es = pTsTable->add(pStyle);<BR> if (es != Acad::eOk)<BR> {<BR> CString message;<BR> message.Format("%d",es);<BR> AfxMessageBox(message);<BR> }<BR> pStyle->close();<BR> }</P>
<P> AcDbObjectId styleId;</P>
<P> es = pTsTable->getAt(theFont,styleId);<BR> if (es != Acad::eOk)<BR> {<BR> CString message;<BR> message.Format("%d",es);<BR> AfxMessageBox(message);<BR> }</P>
<P><BR> pTsTable->close();<BR> </P>
<P> AcDbText * text = new AcDbText(AcGePoint3d(10,10,0),"你好",styleId,8,0);<BR> AcDbBlockTable *pBlockTable;<BR> acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable,AcDb::kForRead);<BR> AcDbBlockTableRecord *pBlockTableRecord;<BR> pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite);<BR> pBlockTable->close();<BR> AcDbObjectId textId;<BR> es = pBlockTableRecord->appendAcDbEntity(textId,text);<BR> <BR> text->close();<BR> pBlockTableRecord->close();</P> <P class=MsoNormal style="TEXT-ALIGN: left" align=left>AcDb3PointAngularDimension::AcDb3PointAngularDimension 函数 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>AcDb3PointAngularDimension(<o:p></o:p></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>const AcGePoint3d& <SPAN class=SpellE>centerPoint,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>const AcGePoint3d& xLine1Point,<o:p></o:p></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>const AcGePoint3d& xLine2Point,<o:p></o:p></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>const AcGePoint3d& <SPAN class=SpellE>arcPoint,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>const char* <SPAN class=SpellE>dimText = NULL,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">AcDbObjectId</SPAN> <SPAN class=SpellE>dimStyle = AcDbObjectId::kNull);<o:p></o:p></SPAN></P>
<TABLE class=a style="mso-cellspacing: 1.5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" cellPadding=0 border=0>
<TBODY>
<TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes">
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">centerPoint</SPAN><o:p></o:p></P></TD>
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>输入被<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>标注</FONT>的角度的中点(顶点)(在<SPAN lang=EN-US>WCS中)<o:p></o:p></SPAN></P></TD></TR>
<TR style="mso-yfti-irow: 1">
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>xLine1Point<o:p></o:p></P></TD>
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>输入第一条界线的开始点(在<SPAN lang=EN-US>WCS中)<o:p></o:p></SPAN></P></TD></TR>
<TR style="mso-yfti-irow: 2">
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>xLine2Point<o:p></o:p></P></TD>
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>输入第二条界线的开始点(在<SPAN lang=EN-US>WCS中)<o:p></o:p></SPAN></P></TD></TR>
<TR style="mso-yfti-irow: 3">
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">arcPoint</SPAN><o:p></o:p></P></TD>
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>输入将在<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>标注</FONT>弧上的一个点<SPAN lang=EN-US><o:p></o:p></SPAN></P></TD></TR>
<TR style="mso-yfti-irow: 4">
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">dimText</SPAN><o:p></o:p></P></TD>
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>输入作为<FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff>标注</FONT>文本的文本字符串<SPAN lang=EN-US><o:p></o:p></SPAN></P></TD></TR>
<TR style="mso-yfti-irow: 5; mso-yfti-lastrow: yes">
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 10.5pt; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体">dimStyle</SPAN><o:p></o:p></P></TD>
<TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" vAlign=top>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left>输入要使用的<SPAN class=SpellE><SPAN lang=EN-US>AcDbDimStyleTableRecord</SPAN>的对象ID<o:p></o:p></SPAN></P></TD></TR></TBODY></TABLE>
页:
[1]