Auto Enter thru a autoloading command in acaddoc.lsp

Discussion in 'AutoCAD' started by Chris Chiles, Feb 18, 2005.

  1. Chris Chiles

    Chris Chiles Guest

    I have added this to my acaddoc.lsp to run the layerfilterdelete command:

    (load "s:\\_AutoCad 2005 Settings\\Lisp\\removelayerfilter.lsp")
    (c:lfd)
    (princ)

    But, How do I tell it to ENTER thru the following question: "Wildcard mask
    for filters to keep, or <Enter> to delete all":

    or,

    I thought I could have a duplicate removelayerfilter.lsp that is edited to
    not ask and delette all filters but I don't know enough about lisp to edit
    it.

    Thanks,
    Chris
     
    Chris Chiles, Feb 18, 2005
    #1
  2. Chris Chiles

    iwafb Guest

    I'm not sure if this would work with your function, but I thought you could run a script to your acaddoc.lsp would look like:

    (load "s:\\_AutoCad 2005 Settings\\Lisp\\removelayerfilter.lsp")
    (command "script" ""s:\\_AutoCad 2005 Settings\\Lisp\\removelayerfilter.scr")")

    then the srcipt file (named removelayerfilter.scr) could be:

    (c:lfd)
    Y
     
    iwafb, Feb 21, 2005
    #2
  3. Chris Chiles

    Walt Engle Guest

    What you have listed may well work - I am not going to try it BUT what you have listed is NOT a script file.......it is a lsp
    routine and should be saved as lfd.lsp.

    Script files and lsp routines are nor the same thing.
     
    Walt Engle, Feb 21, 2005
    #3
  4. Chris Chiles

    iwafb Guest

    I understand that there is a difference. In fact, this is a direct extract from some of our internal customization.

    It is true that typically a script file is used to run a series of commands, say OPEN, Plot ... However, there is nothing preventing you from calling a lisp routine from a script for example (c:lfd). If you were to use my example as a lisp, then you would not be able to answer individual questions, in the case of a script you can. Admittedly, the question here is not Yes or No, but enter, in which case you should just be able to substitute Y for Enter (or whaterver the equivalent is for a script) I have not had the need to answer a question with an enter so I don't know if it should be a character or not.
     
    iwafb, Feb 21, 2005
    #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.