|
发表于 2010-9-14 11:38:58
|
显示全部楼层
- Dim E As AcadEntity, T As AcadText, S As String
- r6 r( W! ]$ A1 Y. J* W4 f0 f - S = "XXX"0 i# x4 m8 D7 n: P4 C' Z1 Z+ K% @( [
- For Each E In ThisDrawing.ModelSpace
, D4 n9 n# F; g+ E - If E.ObjectName = "AcDbText" Then
, t2 u3 l0 T; H - Set T = E" E/ m/ [7 {9 l! L
- If T.TextString = S Then
. w ?% T% s. T3 X - MsgBox "单行文字" & S & "的位置:" & vbCrLf & _
: U5 n! @& y# {1 |# ^ M# L7 k - "(" & T.InsertionPoint(0) & "," & T.InsertionPoint(1) & "," & _
, G* B: U U8 w" D6 E4 N - T.InsertionPoint(2) & ")" & vbCrLf & "字高:" & T.Height
, { |8 h; \1 Q! N0 ~# N0 x7 }! D - Exit For4 c; ^, @& q0 U# T
- End If
4 g+ h" C$ k# ^9 u* @ - End If3 I& Y. A& C& ~- N1 d; m- W
- Next
复制代码 |
|