请问真正高手:关于CAD里面选择集过滤器的使用
Dim sobj As AcadObject<BR> Dim ssetObj As AcadSelectionSet<BR> Dim GpCode(0 to 1) As Integer<BR> Dim DataValue(0 to 1) As Variant<BR> Set ssetObj = ThisDrawing.SelectionSets.Add("SSET" + CStr(Rnd(1)))<BR> GpCode(0) = 0<BR> DataValue(0) = "Line"<BR> GpCode(1) = 8<BR> DataValue(1) = "0"<BR> Mode = acSelectionSetAll<BR> ssetObj.Select Mode, , , GpCode, DataValue<BR>上面可以选择0图层里面的所有线<BR>怎么选择0图层里面的所有块?<BR> 用以下都不行:<BR> GpCode(0) = 0<BR> DataValue(0) = "Block"<BR>or<BR> GpCode(0) = 0<BR> DataValue(0) = "BlockRef"<BR> DataValue(0) = "Insert" <P>雪山飞狐 老大,请问如何将几个不同块名的块添加到一个选择<STRONG>集???</STRONG></P><P>Dim sobj As AcadObject<BR> Dim ssetObj As AcadSelectionSet<BR> Dim GpCode(0 to 1) As Integer<BR> Dim DataValue(0 to 1) As Variant<BR> Set ssetObj = ThisDrawing.SelectionSets.Add("SSET" + CStr(Rnd(1)))<BR> GpCode(0) = 0<BR> DataValue(0) = "Line"</P>
<P><BR> GpCode(1) = 2</P>
<P> DataValue(1) = "z1,z2,z3"</P>
<P><BR> Mode = acSelectionSetAll<BR> ssetObj.Select Mode, , , GpCode, DataValue<BR>上面可以选择块名为z1,z2,z3的所有块</P>
<P>请问:</P>
<P>如何以 OR 的关系分别选择??</P>
<P> DataValue的值可否为空??</P>
<P>可否用一小结构??</P>
<P>GpCode(1) = -4<BR> DataValue(1) = "< or"</P>
<P>IF *** THEN </P>
<P> GpCode(2) = 2<BR> DataValue(2) = "Z1"</P>
<P>END IF</P>
<P>IF *** THEN </P>
<P> GpCode(3) = 2<BR> DataValue(3) = "Z2"</P>
<P>END IF</P>
<P>IF *** THEN </P>
<P> GpCode(4) = 2<BR> DataValue(4) = "Z3"</P>
<P>END IF</P>
<P>GpCode(5) = -4<BR> DataValue(5) = " or >"</P>
<P><BR> </P>
页:
[1]