Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Load or Code Issue? Invoking Lisp from Command Line
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Load or Code Issue? Invoking Lisp from Command Line (Read 843 times)
0 Members and 1 Guest are viewing this topic.
Chillme1
Newt
Posts: 57
Must learn to earn!
Load or Code Issue? Invoking Lisp from Command Line
«
on:
December 20, 2021, 10:31:27 AM »
Before a needed back-to-basics LISP learning series, I ask:
What is needed to make this borrowed lisp routine run?
After ensuring the attached lisp file routine is in the SFSP and the loading it (load "deletelayerstate"), AutoCAD proudly announces that the LOAD failed.
Code - Auto/Visual Lisp:
[Select]
(
defun
c:deletelayerstate
(
/
lsp pat s
)
(
setvar
"cmdecho"
0
)
(
if
(
setq
lst
(
a
+
layerstatelist
)
)
(
progn
(
foreach
s lst
(
princ
(
strcat
"
\n
"
s
)
)
)
;foreach
(
textscr
)
(
setq
pat
(
getstring
"
\n
Type name or patern of layerstates to delete: "
)
)
(
command
"_-Layer"
"_State"
)
(
foreach
s lst
(
if
(
wcmatch
s pat
)
(
progn
(
beep
)
(
command
"_delete"
s
)
(
princ
(
strcat
"
\n
"
s
" - deleted"
)
)
)
;progn
)
;if
)
;foreach
(
command
""
""
)
)
;progn
)
;if
(
princ
)
)
;defun
Logged
Thanks, Clint
Mechanical Designer / Process Piping
AutoCAD Toolsets 2022
Newbie Betimes - LISP Programmer
JohnK
Administrator
Seagull
Posts: 10669
Re: Load or Code Issue? Invoking Lisp from Command Line
«
Reply #1 on:
December 20, 2021, 10:51:31 AM »
You need to find the following functions (and load those at the same time as this one):
(a+laterstatelist)
(beep)
Logged
TheSwamp.org
(serving the CAD community since 2003)
Member location map - Add yourself
Donate to TheSwamp.org
Chillme1
Newt
Posts: 57
Must learn to earn!
Re: Load or Code Issue? Invoking Lisp from Command Line
«
Reply #2 on:
December 20, 2021, 02:42:19 PM »
Ah-ha! Delving into web history...!
Thanks,
Logged
Thanks, Clint
Mechanical Designer / Process Piping
AutoCAD Toolsets 2022
Newbie Betimes - LISP Programmer
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Load or Code Issue? Invoking Lisp from Command Line