Tfisch 发表于 2022-7-5 18:01:36

New to LISP, looking for some

For the last 2 or 3 days I have done more than my fair share of "googl-ing" and research on Lisps.. I have done a few of the "practice" lisp's and have read mutiple threads, posts, websites, all on lisp's. This is opening up a new world for me, as I know NOTHING about CPU programming, writing code, or am even THAT good with a computer...
 
with that said. I am trying to find (or make?) a few Lisp's...
 
one that cleans up drawings the way we do them and one that will automatically space a duct diffuser in the center of a room or a certain space away from another diffuser.
 
i.e. :if there is a 20' long room and it needs 2 diffusers in it, the first diffuser would be 5 ft off the wall, then there would be doulbe the distance inbetween them, so 10' between them, and then another 5' on the other side of the last diffuser.
 
also looking for any other mechanical-type lisp. I saw a pipe design one on here, but I could not get the program to open.

BIGAL 发表于 2022-7-5 18:29:17

heres a start
 
(setq pt1 (getpoint "\nPick first point"))
(setq pt2 (getpoint "\nPick second point"))
(setq dist (distance pt1 pt2))
(setq ang (angle pt1 pt2))
(while (> dist 5.0)
(setq newpt (polar pt1 5.0 ang))
(command "point" newpt) ; change this to "insert" diffuser
(setq dist (- dist 5.0)
(setq pt1 newpt)
) ; endwhile

CAD USER 发表于 2022-7-5 19:00:02

 
please someone can give me the complete code. so I can copy in Notepad..

Happy Hobbit 发表于 2022-7-5 19:18:40

It's a whole lot easier in VLIDE (Visual Lisp Editor) than in Notepad.
In AutoCAD type VLIDE then in the editor click File>New File & paste it into there
Have a look at the Afralisp article on the Visual Lisp Editor
页: [1]
查看完整版本: New to LISP, looking for some