Results 1 to 3 of 3

Thread: Arrow OR Tab Key Function In Lisp?

  1. #1
    I could stop if I wanted to
    Join Date
    2001-11
    Posts
    236
    Login to Give a bone
    0

    Default Arrow OR Tab Key Function In Lisp?

    First, can the ARROW key be programmed in a list routine?

    When you open a file and close it, AutoCAD asks if you would like to “Save Changes To (file path)”. Very good for safety! However, in the office, occasionally, I tend to open a bunch of files I would rather view on the workspace for better view. When I use the “Close All” function in the Window menu, I get (traditionally) “Save Changes To (file path).

    Under normal circumstance, I will ALWAYS use the TAB key or use the right-arrow key to move my action to “NO” so the current file would not be saved. Is there a way to suppress this request dialog box from showing and just close the opened drawing (by adding the arrow-key function in my toolbar button)? If so, what would be the function in programming to use?

  2. #2
    I could stop if I wanted to
    Join Date
    2006-06
    Location
    Olympia, Washington, U.S.A.
    Posts
    359
    Login to Give a bone
    0

    Default Re: Arrow OR Tab Key Function In Lisp?

    i'm not completely sure what your asking. what i gather is that you open and start a new drawing and leave it open then when you use CLOSEALL it prompts to save to a path.

    BUT....i'm going to assume that you are also opening drawings that already have been saved.

    use SAVEALL first it automatically Q-saves all drawings to the default path. and prompts for the save path of new drawings. CLOSEALL then closes all drawings without prompts. when i go home at night those are the last two commands i give.

    SAVEALL
    CLOSEALL
    hit the X
    go home
    open beer
    (taskes may vary after this)

    Hope this helps.

  3. #3
    I could stop if I wanted to
    Join Date
    2005-02
    Location
    Tasmania
    Posts
    278
    Login to Give a bone
    0

    Default Re: Arrow OR Tab Key Function In Lisp?

    Quote Originally Posted by omorah View Post
    First, can the ARROW key be programmed in a list routine?
    Not that I'm aware of, but I'm not a LISP guru by any means.

    Quote Originally Posted by omorah View Post
    Is there a way to suppress this request dialog box from showing and just close the opened drawing (by adding the arrow-key function in my toolbar button)? If so, what would be the function in programming to use?
    I don't know that you can do it the way you want to, but another approach would be to use VBA.

    I tried using CLOSEALL in a LISP command statement, but the input required vaires from the first drawing to the second, making things difficult.

    The simplest VBA approach that I can think of would be to get the collection of open documents and then iterate through them with a FOR...NEXT loop. Something like this:

    Code:
    Dim objAcadApp As AutoCAD.AcadApplication
    Dim objAcadDocs As AutoCAD.AcadDocuments
    Dim objThisDwg As AutoCAD.AcadDocument
     
    Set objAcadDocs = objAcadApp.Documents
    For Each objThisDwg In objAcadDocs
        objThisDwg.Close(False)
    Next
    Note: The above code is not tested, but should be able to form the basis of a solution for you.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

    - Kristin Wilson, Nintendo, Inc., 1989.

Similar Threads

  1. New function in ObjectARX for LISP
    By erick_19_hk266024 in forum ARX
    Replies: 1
    Last Post: 2013-08-26, 12:46 PM
  2. My first lisp function...
    By JLHConsulting in forum AutoLISP
    Replies: 19
    Last Post: 2010-06-11, 06:06 PM
  3. Replies: 7
    Last Post: 2009-11-02, 05:38 AM
  4. Change Arrow Keys to a Precise Rotation Function
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 0
    Last Post: 2007-05-21, 02:31 AM
  5. My UP Arrow doesnt function as it used to
    By jcdecastro in forum AutoCAD General
    Replies: 8
    Last Post: 2006-06-27, 03:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •