Named Layer Filter

Discussion in 'AutoCAD' started by Joel Hills, Jul 10, 2003.

  1. Joel Hills

    Joel Hills Guest

    I have a few saved layer filters, is there a way to set the Named Layer
    Filter before loading the Layer Properties Manager?

    The Layer Properties Manager only wants to default to the last layer filter
    used, any suggestions?
     
    Joel Hills, Jul 10, 2003
    #1
  2. Joel Hills

    Kevin Terry Guest

    Here's the help file sample (revised):

    Dim oDict As AcadDictionary
    Dim LayFlt As Object
    Dim oXrec As AcadXRecord
    Dim xType As Variant, xValue As Variant

    Set oDict = ThisDrawing.Layers.GetExtensionDictionary
    Set LayFlt = oDict.item("ACAD_LAYERFILTERS")
    Set oXrec = LayFlt("nplt")

    oXrec.GetXRecordData xType, xValue
    MsgBox "Layer Filter name: " & xValue(0)

    You can use the begin command event on the layer command to set a filter.

    Kevin
     
    Kevin Terry, Jul 10, 2003
    #2
  3. Joel Hills

    Kevin Terry Guest

    Yes, frustratingly so. I've wished for a long time to be able to apply the
    'xref dependant layers' filter and invert it as well, and that one is
    inaccessible too. Although you might be able to create a layer filter on the
    fly through code by using the layer name - since they all have the xref file
    name followed by a | character.

    Kevin
     
    Kevin Terry, Jul 10, 2003
    #3
  4. Does anyone know why the code above does not work??
    Thanks
     
    MarcelGosselin, Jul 16, 2003
    #4
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.