<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">我弄了很久,无法将图面的数字赋值给<FONT face="Times New Roman">A</FONT>,烦请高手指教,多谢!
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5">图面<FONT face="Times New Roman"> 100</FONT>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5">选择集<FONT face="Times New Roman"> text</FONT>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><FONT face="Times New Roman">A= ThisDrawing.ModelSpace.text</FONT>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 26.25pt; mso-char-indent-count: 2.5"><FONT face="Times New Roman">A</FONT>值为<FONT face="Times New Roman">0<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT>
reply
你要先得到text对象,然后读取它的属性值:(如下autocad帮助文件中的例子)<PRE class=Code>Sub Example_TextString()
' This example creates a text object in model space.
' It then returns the text string for that object.
<FONT color=#3300ff>Dim textObj As AcadText '声明</FONT>
Dim text As String
Dim insertionPoint(0 To 2) As Double
Dim height As Double
' Define the text object
text = "Hello, World."
insertionPoint(0) = 2: insertionPoint(1) = 2: insertionPoint(2) = 0
height = 0.5
' Create the text object in model space
<FONT color=#0000ff>Set textObj</FONT> = ThisDrawing.ModelSpace.AddText(text, insertionPoint, height)<BR> <FONT color=#f76809>'赋值</FONT>
ZoomAll
' Return the current text string for the object
text = textObj.<FONT color=#3300ff>textString '读属性</FONT>
MsgBox "The TextString property equals: " & text, vbInformation, "TextString Example"
End Sub</PRE> 好东西。 谢谢楼主。。啊。。顶。。。。 下啦很多有用的东西,不顶一下对不起自己呀! 楼主辛苦了 up 真是感谢!辛苦了! 不错,多谢!!!!
但是我现在没用到。
多上传别的关于画图标注的源代码!!
谢谢!!!! 好,很好,非常好!!!!谢谢!特别感谢!!!!