|
发表于 2010-9-14 11:38:58
|
显示全部楼层
- Dim E As AcadEntity, T As AcadText, S As String" E+ V @. d3 G9 L. A- @9 [
- S = "XXX"
& G7 u" K# O/ T - For Each E In ThisDrawing.ModelSpace
0 E6 N/ V: o6 X( P% F - If E.ObjectName = "AcDbText" Then: _- g% u1 M* k1 L! t
- Set T = E
% l. o8 [" R" d6 }9 u7 T9 a) D& Z - If T.TextString = S Then) ]4 Y p9 A* C; X
- MsgBox "单行文字" & S & "的位置:" & vbCrLf & _
. h7 Z& o7 R& M' w - "(" & T.InsertionPoint(0) & "," & T.InsertionPoint(1) & "," & _
6 R6 U) K( W8 c - T.InsertionPoint(2) & ")" & vbCrLf & "字高:" & T.Height* D; g* _* W7 C9 |* B0 S5 S9 \* r
- Exit For' i Q6 u. ~1 Q+ h2 \" [
- End If
# i; Q, k8 p7 ~6 a5 x& N& Q - End If
( t0 D5 g J3 Y5 @# T( L/ p - Next
复制代码 |
|