Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lisp files

Status
Not open for further replies.

R12NV

Civil/Environmental
Sep 4, 2002
54
0
0
AU
Where is a good place on the net to get examples of basic lisp to learn from, nothing to complicated.


cheers,
 
Replies continue below

Recommended for you

What Im trying to do is to make a lisp for a leader line, but to make it so it will have dual heads.(line a wish bone)

Im very much a beginer with lisp so plese be pacient.

this is what i have sorted out so far, it's very rought but im learning.

(defun c:db ()
(setq 1P (getpoint "\n Enter 1st leader point:"))
(setq 2P (getpoint "\n Enter 2ND leader point:"))
(setq 3P (getpoint "\n Enter 3RD leader point:"))
(command "LINE" 1P 3P 2P)
)

this gets me basically what i want, the double wish bone minus the arrow heads, if i change LINE to Leader. It gets me one leader but it goes through all three points.

Can some one please help me out,
 
Well, for the first question. A great site is

For the second question. I am not quite sure what you want. Are you picking in space, 3 arbitrary positions (points) and then want to draw 2 lines between the three points and at the first point and the second point, draw an arrowhead?

Let me know if this is correct.
 
If 3P is the common endpoint of the "wish-bone", and 1P and 2P are the arrowhead ends:

(defun c:db ()
(setq 1P (getpoint "\n Enter 1st leader point:"))
(setq 2P (getpoint "\n Enter 2ND leader point:"))
(setq 3P (getpoint "\n Enter 3RD leader point:"))
(command "LEADER" 1P 3P)
(command "LEADER" 2P 3P)
)

As a suggestion, before learning lisp, go through EVERY AutoCAD command and system variable and make sure you understand the prompt sequences. Without a very good grasp of how the commands function, LISP will only cause trouble and lost time.

 
Status
Not open for further replies.
Back
Top