Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

layoutlist function

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
mdhutchinson
2534 Views, 8 Replies

layoutlist function

(layoutlist) ... returns a list of strings of the layout tabs in the drawing.

 

I've used this ages... Isn't it a core lisp function, or is it coming from express tools or somewhere else?

8 REPLIES 8
Message 2 of 9
BlackBox_
in reply to: mdhutchinson

LayoutList is a core LISP function found in the developer documentation.



"How we think determines what we do, and what we do determines what we get."

Message 3 of 9
mdhutchinson
in reply to: BlackBox_

I thought I recognized you from recent post concerning accorconsole.

acoreconsole says it is unknown function.

Message 4 of 9
BlackBox_
in reply to: mdhutchinson

I see... I took the phrasing of your OP to mean "core" = basic, standard, vanialla AutoLISP (i.e. no Visual LISP, etc.), and not core console. 

 

Having read your recent post in your AcCoreConsole thread, this makes much more sense to me now... I'll be interested to see what becomes of it. 

 

Cheers!



"How we think determines what we do, and what we do determines what we get."

Message 5 of 9
mdhutchinson
in reply to: mdhutchinson

I found what I needed... the below works in AcCoreConsole.

 

(defun GetLayoutListACoreConsole ()
 (defun massoc (key alist / x nlist)
  (foreach x alist
   (if (eq key (car x))
    (setq nlist (cons (cdr x) nlist))
   )
  )
  (reverse nlist)
 )
 (massoc 3 (dictsearch(namedobjdict)"acad_layout"))
)

Message 6 of 9
BlackBox_
in reply to: mdhutchinson

Glad you got is sorted; thanks for posting the solution for others to find.

 

Here's wishing Autodesk would enbled full Visual LISP functionality for AcCoreConsole. *throws penny in wishing well*



"How we think determines what we do, and what we do determines what we get."

Message 7 of 9

This is a real bump I guess... Smiley Embarassed but still I am very interested in getting this to work for my 'Plot all layouts'-corescript. I can't get your code to work. Not in core nor in Autocad. Any idea what I'm doing wrong?

 

Best regard Henrik

 

Message 8 of 9

I get an error after the first plot.  Where am I going wrong?

 

(defun c:PALPDF ()
(defun massoc (key alist / x nlist)
(foreach x alist
(if (eq key (car x))
(setq nlist (cons (cdr x) nlist))
)
)
(reverse nlist)
)
(setq CurrDwgName (getvar "dwgname"))
(setq Fname (substr CurrDwgName 1 (- (strlen CurrDwgName) 4)))
(setq layoutlistX (massoc 3 (dictsearch(namedobjdict)"acad_layout")))
(foreach x layoutlistX
(if (/= x "Model")
(
(command "-Plot" "Y" x "DWG to pdf.pc3" "11X17" "Inches" "L" "n" "Layout" "Fit" "0,0" "Y" "" "Y" "Y" "Y" "n" (strcat (getvar "DWGPREFIX") Fname "-" x ".pdf") "N" "Y")
))
)
)

Message 9 of 9

never mind.  parenthesis in the wrong place.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost