Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

tkollarAB2B9
426 Vistas, 3 Respuestas

LISP on MAC, New for me, did a bunch on windows side 20 years ago need help getting started again

is there a good guide to getting started in LISP on the MAC side. I am lost LOL.

 

I have a ton of old Lisp routines  I wrote or modified several years ago and I started with a simple one that should add a plot date and time to a drawing. all I get back from AutoCAD is "error: malformed list on input". any input would be welcome. this is not a required thing for me but I just started here as it seamed like a simple starting place

 

 

;        Stamper -  Date/Time Stamp your drawings
;______________________________________________________
 
(defun C:STAMPER ()
(Prompt "\nSTAMPER -DATE/TIME Stamp your Drawings")
;
;
(setq OLD_CMDECHO (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(Prompt "\nPlease wait while the stamp is updated")appload
;
(setq TEXT_ENTITY (ssget "x"(list(cons 0 "TEXT")(cons 62 7))))
;
(if(Null TEXT_ENTITY)
(progn
(Prompt "\nSTAMP not found, creating it...")
(command ".TEXT" ".25,.25" 0.1 90 "STAMPER")
(setq TEXT_ENTITY (entlast))
(prompt "Complete.\n")
)
)
(setq DATE_TIME (rtos (getvar "CDATE") 2 8))
(setq MONTH (substr DAT_TIME 5 5))
(setq DAY (substr DATE_TIME 7 2))
(setq YEAR (substr DATE_TIME 3 2))
(setq HOUR (substr DATE_TIME 10 2))
(setq MINUTE (substr DATE_TIME 12 2))
(setq NEW_STRING
(strcat "SENT TO PLOTTER ON "YEAR"/"MONTH"/"DAY"/" at "HOUR":"MINUTE")
)
(command ".change" TEXT_ENTITY "" "" "" "" "" "" NEW_STRING)
(command ".chprop" TEXT_ENTITY "" "C" 7 "LA" 0"")
(setvar "CMDECHO" OLD_CMDECHO)
 
(prompt "Proigram Complete"
(princ)