|
发表于 2010-9-14 11:38:58
|
显示全部楼层
- Dim E As AcadEntity, T As AcadText, S As String- c* O7 y; ?9 Y$ I: D
- S = "XXX"
9 U. o$ l) l; `6 L- \& D! \ - For Each E In ThisDrawing.ModelSpace
4 K2 S$ A/ Z. q4 m - If E.ObjectName = "AcDbText" Then+ c) [7 n- R" E w- l k
- Set T = E
& L& O9 k3 v* V, U$ i7 |7 e/ G - If T.TextString = S Then5 U3 U7 J: x- D" L
- MsgBox "单行文字" & S & "的位置:" & vbCrLf & _
, r" K( R. @" g+ h; Z - "(" & T.InsertionPoint(0) & "," & T.InsertionPoint(1) & "," & _
8 |# j. e& P1 \+ h' A' s" g0 ?: ] - T.InsertionPoint(2) & ")" & vbCrLf & "字高:" & T.Height
1 _& M7 X* e3 |! r3 t - Exit For. m5 U; e8 E( ^' o: G) F
- End If8 k; H; f% S+ T) q
- End If- L8 Y' W" S' q' h- g# x5 z' e1 x9 Y2 ^
- Next
复制代码 |
|