|
为什么我不能过滤掉不要的图层?
sub aaa()
Dim txLa As AcadLayer
Dim TxSS As AcadSelectionSet
Dim i As Integer, j As Integer
Dim Fd(0) As Integer
Dim fdata As Variant, ftype As Variant
Fd(0) = 8
fdata = Fd(0)
Set TxSS = ThisDrawing.SelectionSets.Add("Txss")
For i = 0 To ThisDrawing.Layers.Count - 1
Set txLa = ThisDrawing.Layers.Item(i)
If txLa.Name "0" Then
ftype = txLa.Name
TxSS.Select acSelectionSetAll, ftype, fdata
' Debug.Print TxSS.Item(0).Layer, TxSS.Item(0).ObjectName
ThisDrawing.Export txLa.Name, "wmf", TxSS
TxSS.Clear
End If
Next i
End Sub |
|