|
发表于 2022-7-6 03:27:34
|
显示全部楼层
I forgot to say that lisp is available as babacad extension module (bem). After babacad 1.3 install go to babacad.com/bem and download and install "LISP extension 1.0". You will get BabaCADLispExtension.bem in \ProgramFiles\BabaCAD\BabaCAD\ExtensionModules\.
I made lisp as separate module cause future improvements and easier programming and bugs fixing.
Most of autolisp functions are implemented (defun cmdname(), defun c:cmdname(a b / c d e),princ,print,setq,entsel,entget,ssget,ssget "X",ssadd,entmod,eq,equal,,+,-,/,*,sqrt,cos,sin,atan,angle,distance,polar,getint,getreal,getdist,getstring,list,car,cadr,nth,assoc,repeat,while,if...). I'm working on missing functions like mapcar, foreach, strcat, str...
You can appload lisp or you can type in command line like (setq a 100 b 3) (setq c (/ a b)) (defun c:mycmd() (princ "testing...")(princ)) mycmd ... or you can even go to next line with enter and continue to write lisp until last bracket. |
|