Results 1 to 2 of 2

Thread: Combine query lisp with layer draw order lisp?

  1. #1
    Login to Give a bone
    0

    Default Combine query lisp with layer draw order lisp?

    Hi
    I have two lisps that I would like to have run as one. The first one runs a query on an attached file, then detaches the file.
    The second lisp changes the draw order of selected layers to bring to front. Both lisps work great, but would work much better if they run consecutive (as one). I have tried simply adding the lisp together, but no matter where I place the second one in, it does not run. Not sure if I am missing something to run one to the other.


    Lisp one:
    HTML Code:
    (defun c:executequery (/)(ade_errsetlevel 2)(ade_qryexecute) (foreach x (ade_dslist) (ade_dsdetach x))))
    Lisp two:
    HTML Code:
    (defun c:layers (/ layerList data ss)
      (foreach layer '("S-POLE" "S-POLE_NOT_GPS" "S-PED" "S-VAULT" "S-MANHOLE" "Addresses-Never_Served" "Addresses-Served")
        (if (and (setq data (tblsearch "LAYER" layer)) ; layer exists
                 (zerop (logand 4 (cdr (assoc 70 data)))) ; layer unlocked
                 (setq ss (ssget "_X" (list (cons 8 layer)))) ; layer has objects
            )
          (command "_.draworder" ss "" "_front" "regen")
        )
      )
      (princ)
    )

  2. #2
    I could stop if I wanted to
    Join Date
    2003-07
    Posts
    473
    Login to Give a bone
    0

    Default Re: Combine query lisp with layer draw order lisp?

    Try

    (c:executequery)
    (c:layers)

Similar Threads

  1. draw order, display order
    By Wish List System in forum ACA Wish List
    Replies: 1
    Last Post: 2015-06-24, 12:57 PM
  2. Add Draw Order/Lines Merge/Lines Overwrite settings to layer properties
    By Wish List System in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2013-10-25, 01:57 AM
  3. 2012: Display Order / Draw Order
    By Iceberg in forum AutoCAD General
    Replies: 1
    Last Post: 2013-08-08, 02:33 PM
  4. Draw Order by Layer
    By kathy.oconnell in forum AutoCAD General
    Replies: 13
    Last Post: 2008-02-15, 04:34 PM
  5. Layer Property to Contain Draw Order
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2007-05-26, 06:41 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
  •