Layer Filter deleting problem

Discussion in 'AutoCAD' started by hamid2, Jun 11, 2004.

  1. hamid2

    hamid2 Guest

    I use the following code to delete a layer filter. it used to work in AutoCAD 2000 but not for 2005!

    It does not give me any error message but the filter name still exists in Layer Properties Manager.

    Any Idea?

    ThisDrawing.Layers.GetExtensionDictionary("ACAD_LAYERFILTERS").Item("FilterName").Delete

    Thank you in advance
     
    hamid2, Jun 11, 2004
    #1
  2. Layer filters can be stored in two dictionaries now:

    ACAD_LAYERFILTERS
    AcLyDictionary


    --
    R. Robert Bell


    I use the following code to delete a layer filter. it used to work in
    AutoCAD 2000 but not for 2005!

    It does not give me any error message but the filter name still exists in
    Layer Properties Manager.

    Any Idea?

    ThisDrawing.Layers.GetExtensionDictionary("ACAD_LAYERFILTERS").Item("FilterN
    ame").Delete

    Thank you in advance
     
    R. Robert Bell, Jun 11, 2004
    #2
  3. hamid2

    hamid2 Guest

    Where is "AcLyDictionary" ? and How get to it?
    I replaced the "ACAD_LAYERFILTERS" with "AcLyDictionary", it says "Key not found".
     
    hamid2, Jun 14, 2004
    #3
  4. I think what you are doing is correct but the filter can't be found because it doesn't exist in your circumstance because it is still a pre 2005 filter. I think the reason you could not delete it with your original code is that it is a current filter.

    Because your original code did not produce an error it indicated to me that it had found the filter and then I relised the current filter can't be deleted.

    Regards - Nathan
     
    Nathan Taylor, Jun 28, 2004
    #4
  5. hamid2

    cadmaxza Guest

    What is the difference between ACLYDICTIONARY and ACAD_LAYERFILTERS? Is ACAD_LAYERFILTERS the pre-2005 dictionary for layer filters and ACLYDICTIONARY the 2005 dictionary for layer filters?

    Thx.
     
    cadmaxza, Oct 19, 2004
    #5
  6. Pre 2005 created only ACAD_LAYERFILTERS. 2005 can create both ACLYDICTIONARY and ACAD_LAYERFILTERS. I still do not fully understand how layer filters are stored but I have worked out how to remove all filters and create the filters I need.

    Regards - Nathan
     
    Nathan Taylor, Oct 19, 2004
    #6
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.