lisp routine?

Discussion in 'AutoCAD' started by adamstcyr, Jul 8, 2004.

  1. adamstcyr

    adamstcyr Guest

    I'm super new to this stuff, so bear with me...

    is this a lisp routine?

    (defun C:fe ()
    (vl-Load-Com)
    (vl-Catch-All-Apply '(lambda ()
    (vla-Remove
    (vla-GetExtensionDictionary
    (vla-Get-Layers
    (vla-Get -ActiveDocument
    (vlax-Get-Acad-Object)))) "ACAD_LAYERFILTERS")))
    (princ "\nAll layer filters have been deleted.")
    (princ)
    )

    evidently I can use this to clear out Layer Filters......
    the problem is I don't know how to use it.

    could someone explain it to me please?
    I have searched extensively on the newsgroups and in the help topics and cannot figure it out.

    thanks.-AS
     
    adamstcyr, Jul 8, 2004
    #1
  2. adamstcyr

    Rudy Tovar Guest

    Just use 'appload' to load it.

    Then type the name 'FE' at the command prompt.

    If it doesn't activate, then it would have to be compiled as a VLX, but from
    the looks of it, it doesn't.
    --

    AUTODESK
    Authorized Developer
    http://www.Cadentity.com
    MASi
     
    Rudy Tovar, Jul 8, 2004
    #2
  3. adamstcyr

    Tom Smith Guest

    Yes, that's lisp.You can run it by typing FE at the command prompt, but it
    must be loaded first. The easiest way is to use the APPLOAD command, browse
    to the file, and select it. You'll need to load it again in each
    drawingwhere you need it, or you can use the APPLOAD startup suite to have
    it automatically loaded in each drawing.
     
    Tom Smith, Jul 8, 2004
    #3
  4. adamstcyr

    T.Willey Guest

    AS,

    Make a new text file, call it "LayFilterDelete.lsp". Once you made that, then copy/paste the code into you new ".lsp" (lisp) file. After you have done this, open acad (or go to if already open). At the command line type "appload" (command to load lisp files and other program files into the current autocad drawing). Now find the lisp routine file and hit ok. After it has loaded you type "fe".

    If you want it to load in all your drawings then when you in the "appload" dialoag area, in the lower right hand side there is a thing called "startup suite". Click on the "contents" button and add your lisp file to it. If you do it this way then all you have to do is type "fe" at the command line when you want to use.

    Hope that helps
    Tim
     
    T.Willey, Jul 8, 2004
    #4
  5. adamstcyr

    adamstcyr Guest

    thanks so much!

    maybe I can make use of some of these "tricks" now
     
    adamstcyr, Jul 8, 2004
    #5
  6. adamstcyr

    dblaha Guest

    If you place this code in a .lsp file that is saved somewhere in your AutoCAD search path (as "fe.lsp" for example), typing:

    (load "fe.lsp")

    on the command line is faster than going through the appload dialog. But using the Startup Suite in the appload dialog is nice if you want it available in every AutoCAD session.
     
    dblaha, Jul 8, 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.