Jump to content

Recommended Posts

Posted

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.

Posted

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

  • 5 years later...
Posted
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..

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...