(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?
Solved! Go to Solution.
Solved by BlackBox_. Go to Solution.
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."
I thought I recognized you from recent post concerning accorconsole.
acoreconsole says it is unknown function.
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."
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"))
)
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."
This is a real bump I guess... 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
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")
))
)
)