layoutlist

Topics relating to AutoLisp and SDS.

Moderators: CMS Inc, avaernes

Post Reply
efernal
Valued Contributor
Posts: 28
Joined: Thu Jul 05, 2007 6:42 pm
Contact:

layoutlist

Post by efernal » Mon Jul 09, 2007 6:19 am

: (layoutlist)
"Layout1 Layout2 "

In AutoCAD, it returns ("Layout1" "Layout2")

This is better, because we can have a layout name as "Layout 1".
So, Intellicad would return "Layout 1 Layout2"

Why not do like AutoCAD?
ef
Danielm103
Valued Contributor
Posts: 52
Joined: Mon Aug 07, 2006 11:01 pm
Location: Albuquerque,NM,USA

Post by Danielm103 » Sat Jul 21, 2007 10:50 am

Try rolling up a lisp

Code: Select all

(defun layoutlist ( / e rl)
 (setq rl '())
 (foreach e (dictsearch (namedobjdict) "ACAD_LAYOUT")
  (if (and
       (= (car e) 3)
       (/= (strcase (cdr e)) "MODEL")
      )
   (setq rl (cons (cdr e) rl))
  )
 )
 (reverse rl)
)
Post Reply