谁有删除层的涵数~
<P>谁有删除层的涵数~</P><P>不管层里有没有实体都能删除掉~</P> <P>肯定要分两部,先删掉图层上的实体,再删掉图层</P>
那是當然了
<P>Set Sset = ThisDrawing.SelectionSets.Add("ss1" & Time())</P><P> fType(0) = 0: fData(0) = "*"<BR> fType(1) = 8: fData(1) = LayerName<BR> FilterType = fType<BR> FilterData = fData</P>
<P><FONT color=#f73809> Sset.Select acSelectionSetAll, , , FilterType, FilterData</FONT><BR> For i = 0 To Sset.Count - 1<BR> Sset(i).Delete<BR> Next i</P>
<P>哪位知道为什么为个老是出现错误啊...</P>
<P>老是在这句的时候出现错误...</P>
<P>Sset.Select acSelectionSetAll, , , FilterType, FilterData</P>
<P>但是在运行一次就好用了..<BR></P> <P>定义fType,fData有问题吧,应该如下:</P>
<P>Dim fType(1) As Integer<BR>Dim fData(1) As Variant</P> <P>我是这样定义的..</P>
<P>Dim FilterType As Variant<BR>Dim FilterData As Variant<BR>Dim fType(0 To 1) As Integer<BR>Dim fData(0 To 1) As Variant</P> <P>直接这样就可以啊</P>
<P>Dim fType(1) As Integer<BR>Dim fData(1) As Variant</P>
<P>Set Sset = ThisDrawing.SelectionSets.Add("ss1" & Time())</P>
<P> fType(0) = 0: fData(0) = "*"<BR> fType(1) = 8: fData(1) = "0"<BR> </P>
<P> Sset.Select acSelectionSetAll, , , fType, fData<BR> For i = 0 To Sset.Count - 1<BR> Sset(i).Delete<BR> Next i</P> <P>谢谢你了..我在试试吧...呵..</P>
<P> </P>
页:
[1]