HELP!
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
HELP!

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Greg



Joined: 16 Jun 2005
Posts: 5

Posted: Fri Jun 17, 2005 12:12 pm    Post subject: HELP! Reply with quote

The lisp routine is as follows:

draws plan details using using using input
(defun c:b3 ()
(setq p9 (getint "Please enter the width of Poured Concrete:" ))
(setq p1 (append '(0 0)))
(setq p2 (append '(0 20)))
(setq p3 (append '(0 20)))
(setq p4 (append '(20 20)))
(setq p5 (nth 0 '(0 20)))
(setq p6 (nth 1 '(0 20)))
(setq p7 (nth 0 '(20 20)))
(setq p8 (nth 1 '(20 20)))
(setq p10 (+ p5 p9))
(setq p11 (- p6 p9))
(setq p12 (+ p5 p9))
(setq p13 (- p8 p9))
(setq p14 (+ p5 p9))
(setq p15 (- p8 p9))
(setq p16 (- p7 p9))
(setq p17 (- p8 p9))
(setq p18 (append '(p10 p11)))
(setq p19 (append '(p12 p13)))
(setq p20 (append '(p14 p15)))
(setq p21 (append '(p16 p17)))
(command "_line" p1 p2 p3 p4 "")
(command "_line" p18 p19 p20 p21 "")

What I am trying to do is have setq 'p10' recognize that it is adding 'p5' and 'p9' together to form the next part of the routine. Is this the right way of doing this. The program ends after it draws the first line. If anyone can help me out, it would be greatly appreciated. [/b]

Back to top
View user's profile Send private message Send e-mail
CadMasterAdam
Guest





Posted: Sat Jun 18, 2005 12:03 am    Post subject: Re: HELP! Reply with quote

Greg wrote:
Quote:
The lisp routine is as follows:

draws plan details using using using input
(defun c:b3 ()
(setq p9 (getint "Please enter the width of Poured Concrete:" ))
(setq p1 (append '(0 0)))
(setq p2 (append '(0 20)))
(setq p3 (append '(0 20)))
(setq p4 (append '(20 20)))
(setq p5 (nth 0 '(0 20)))
(setq p6 (nth 1 '(0 20)))
(setq p7 (nth 0 '(20 20)))
(setq p8 (nth 1 '(20 20)))
(setq p10 (+ p5 p9))
(setq p11 (- p6 p9))
(setq p12 (+ p5 p9))
(setq p13 (- p8 p9))
(setq p14 (+ p5 p9))
(setq p15 (- p8 p9))
(setq p16 (- p7 p9))
(setq p17 (- p8 p9))
(setq p18 (append '(p10 p11)))
(setq p19 (append '(p12 p13)))
(setq p20 (append '(p14 p15)))
(setq p21 (append '(p16 p17)))
(command "_line" p1 p2 p3 p4 "")
(command "_line" p18 p19 p20 p21 "")

What I am trying to do is have setq 'p10' recognize that it is adding
'p5' and 'p9' together to form the next part of the routine. Is this
the right way of doing this. The program ends after it draws the
first line. If anyone can help me out, it would be greatly
appreciated.


first off
what are you trying to accplish with this code?
Back to top
Greg



Joined: 16 Jun 2005
Posts: 5

Posted: Sun Jun 19, 2005 2:41 pm    Post subject: re:HELP! Reply with quote

I am trying to have the lisp routine draw corner plan details based on the user input. If the project calls for a plan detail with a width of 8", it offsets 8". I have reworked the routine to draw a pline and offset it depending upon the user input. The problem I was having, I got corrected. The only problem I have left with the routine is appending the two variables to create x and y coordinates. But when I do that it shows the name of the variable rather than the number it references.

Back to top
View user's profile Send private message Send e-mail
CadMasterAdam
Guest





Posted: Mon Jun 20, 2005 9:32 pm    Post subject: Re: HELP! Reply with quote

Greg wrote:
Quote:
I am trying to have the lisp routine draw corner plan details based on
the user input. If the project calls for a plan detail with a width
of 8", it offsets 8". I have reworked the routine to draw a pline
and offset it depending upon the user input. The problem I was
having, I got corrected. The only problem I have left with the
routine is appending the two variables to create x and y coordinates.
But when I do that it shows the name of the variable rather than the
number it references.

you might have to convert that varible to a real number . "string to

real" or something to that effect.

have fun
Back to top
William Ogle
Guest





Posted: Fri Aug 19, 2005 4:10 pm    Post subject: Re: HELP! Reply with quote

greg, did you get this to work? it sounds like what you really need to know
is this:

Autocad will tell you why it crashed, and what function failed, and which
line of code it is.

Do you need to know how?

"Greg" <gregbell17@hotmail-dot-com.no-spam.invalid> wrote in message
news:scmdnUsrJbV7aC_fRVn_vg@giganews.com...
Quote:
The lisp routine is as follows:

draws plan details using using using input
(defun c:b3 ()
(setq p9 (getint "Please enter the width of Poured Concrete:" ))
(setq p1 (append '(0 0)))
(setq p2 (append '(0 20)))
(setq p3 (append '(0 20)))
(setq p4 (append '(20 20)))
(setq p5 (nth 0 '(0 20)))
(setq p6 (nth 1 '(0 20)))
(setq p7 (nth 0 '(20 20)))
(setq p8 (nth 1 '(20 20)))
(setq p10 (+ p5 p9))
(setq p11 (- p6 p9))
(setq p12 (+ p5 p9))
(setq p13 (- p8 p9))
(setq p14 (+ p5 p9))
(setq p15 (- p8 p9))
(setq p16 (- p7 p9))
(setq p17 (- p8 p9))
(setq p18 (append '(p10 p11)))
(setq p19 (append '(p12 p13)))
(setq p20 (append '(p14 p15)))
(setq p21 (append '(p16 p17)))
(command "_line" p1 p2 p3 p4 "")
(command "_line" p18 p19 p20 p21 "")

What I am trying to do is have setq 'p10' recognize that it is adding
'p5' and 'p9' together to form the next part of the routine. Is this
the right way of doing this. The program ends after it draws the
first line. If anyone can help me out, it would be greatly
appreciated.
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB