- 积分
- 1028
- 明经币
- 个
- 注册时间
- 2004-7-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-5-7 21:08:00
|
显示全部楼层
首先通过直线坐标构建一个选择区域,然后采用
Dim sss As Object, Myss As Object, mode As Integer, en As AcadEntity Dim myRec As AcadLine Set sss = AcadDoc.SelectionSets Set Myss = sss.Add("my7ss") mode = acSelectionSetWindow Dim point(0 To 2) As Double, point2(0 To 2) As Double
'point,point2为直线的两个端点坐标 point(0) = InsPnt(0) - 2: point(1) = InsPnt(1) - 1 point2(0) = InsPnt(0) + 3: point2(1) = InsPnt(1) + 10
'加减的值是查找文字的范围,根据实际需要确定 Myss.Select mode, point, point2 '------------------------------------------------------------- For Each en In Myss 'en包含范围内所有对象,然后针对其中的文本进行处理即可 Next Myss.Delete
|
|