雪山飞狐 老大,请问如何将几个不同块名的块添加到一个选择集???
Dim sobj As AcadObject Dim ssetObj As AcadSelectionSet Dim GpCode(0 to 1) As Integer Dim DataValue(0 to 1) As Variant Set ssetObj = ThisDrawing.SelectionSets.Add("SSET" + CStr(Rnd(1))) GpCode(0) = 0 DataValue(0) = "Line"
GpCode(1) = 2
DataValue(1) = "z1,z2,z3"
Mode = acSelectionSetAll ssetObj.Select Mode, , , GpCode, DataValue 上面可以选择块名为z1,z2,z3的所有块
请问:
如何以 OR 的关系分别选择??
DataValue的值可否为空??
可否用一小结构??
GpCode(1) = -4 DataValue(1) = "< or"
IF *** THEN
GpCode(2) = 2 DataValue(2) = "Z1"
END IF
IF *** THEN
GpCode(3) = 2 DataValue(3) = "Z2"
END IF
IF *** THEN
GpCode(4) = 2 DataValue(4) = "Z3"
END IF
GpCode(5) = -4 DataValue(5) = " or >"
|