layer filter

Discussion in 'AutoCAD' started by Nate Hunter, Jan 12, 2004.

  1. Nate Hunter

    Nate Hunter Guest

    does anyone know who to access the layer manager fileter programically. I
    would like to have the layers pulldown only display the layers in my
    drawing, not the xref layers. I know there is a manual way to do this but
    my users will not do it the manual way.

    I hope I am clear enough on what I would like

    Thanks for your help

    Nate
     
    Nate Hunter, Jan 12, 2004
    #1
  2. go: ALT-O, L, TAB(4), DOWN(2), TAB(2), ALT-I. I can bring up the layer
    manager OK, but the dialog box is not responding to any TABs sent by the
    SendKeys statement. Research on the net produced nothing. Beats the hell out
    of me!

    I've only seen this message in this discussion so I'm not sure what the
    issue is.

    If it's about manipulating, especially deleting filters, this may be useful.

    Sub Lay_F_Start()
    Dim LayerColl As AcadLayers
    Dim LayerDict As AcadDictionary, Dict_KA As AcadDictionary
    Dim iName As String
    Dim i As Integer

    Set LayerColl = ThisDrawing.Layers
    Set LayerDict = LayerColl.GetExtensionDictionary
    Set Dict_KA = LayerDict("ACAD_LAYERFILTERS")
    i = 0
    Do
    On Error GoTo Err_Lay_F
    iName = Dict_KA(i).Name
    On Error GoTo 0
    Select Case iName
    Case "Ext"
    GoSub Filter_Kvar
    Case "Plot"
    GoSub Filter_Kvar
    Case "XREFs"
    GoSub Filter_Kvar
    Case Else
    GoSub Filter_Bort
    End Select
    Loop
    MsgBox "Something went wrong!"
    Stop

    Exit Sub

    Filter_Kvar:
    i = i + 1
    Return

    Filter_Bort:
    Dict_KA.Remove (iName)
    Return

    Err_Lay_F:
    If Err.Number = -2145386481 Then
    i = i + 1
    Resume
    ElseIf Err.Number = 5 Then
    MsgBox "** End **"
    Exit Sub
    Else
    MsgBox "Unknown Error"
    Stop
    End If

    End Sub
     
    Kenth Augustsson, Feb 13, 2004
    #2
  3. From the pasts posts, you cannot set a filter current with lisp or vba, you can create a filter in either one, but little good that does! I would think AutoCAD would catch on sooner or later that people would want this feature.
     
    MarcelGosselin, Feb 13, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.