就是通过直线或多段线所在的坐标来进行选择,从而对它进行编辑!
比如模型空间已有一条直线,我要敲什么代码,才能选中它,对它进行复制。我知道有一种方法,代码如下:
Sub Ch4_AddToASelectionSet()
' 创建新的选择集
Dim sset As AcadSelectionSet
Set sset = ThisDrawing.SelectionSets.Add("SS1")
楼主的意思是不是: 已有一些范围坐标存在系统中,之后选择范围内的某entity? 应该先对坐标赋值,之后用SelectByPolygon 就可以了, 如:
Sub Example_SelectByPolygon()
' This example adds entities to a selection set by defining a polygon.
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET2")
' Add all the entities that lie within a fence to the selection set
Dim mode As Integer
mode = acSelectionSetWindowPolygon 'acSelectionSetFence/ selectionSetWindowPolygon / acSelectionSetCrossingPolygon 三者取一