Tfisch Posted July 9, 2010 Posted July 9, 2010 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. Quote
BIGAL Posted July 10, 2010 Posted July 10, 2010 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 Quote
CAD USER Posted February 21, 2016 Posted February 21, 2016 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 please someone can give me the complete code. so I can copy in Notepad.. Quote
Happy Hobbit Posted February 21, 2016 Posted February 21, 2016 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.