Jump to content

Recommended Posts

Posted

Okay I've written simple lisps before for single commands, but this one I want three commands to run, one after the other.

 

1. retangle

2. Rotate

3. arc

 

what I've written is:

 

(defun c:sw ()

(command "rectang" pause)

(command "roate" pause "")

(command "arc" pause "e" pause "d")

(princ)

)

 

 

But it's not working it'll run the rectangle then finish, what have I done wrong, is there something I've totally missed out? :?

Posted

Yeah on here it is :oops:, but in my file it's spelt correctly. I'm very new to writing these files so I don't know what I've done wrong or what I've missed out, or even if my understanding of them is completely incorrect. :cry:

Posted

Panic over I've figured it!

Posted

Oh sorry, Basically I just wanted a command to make drawing doors easier, so here's what I ended up with, it works great, though it can be done better I'm sure:

 

(defun c:sw ()

(command "rectang" pause "d" "762" "50" pause)

(command "rotate" pause "" pause "270")

(command "arc" pause "e" pause "d")

(princ)

)

Posted

It sure looks that way, it wasn't so much making a door that I was bothered about that was just the excuse to practice writing a lisp, I'm beginning to get the hang of it now, but the one you linked me to has gone right over my head! :?

Posted
It sure looks that way, it wasn't so much making a door that I was bothered about that was just the excuse to practice writing a lisp, I'm beginning to get the hang of it now, but the one you linked me to has gone right over my head! :?

 

There should be some good links on that page to check out :)

 

Also, here are a few good places to check out if you haven't already:

 

Starting LISP:

http://www.afralisp.net/

http://www.jefferypsanders.com/autolisptut.html

http://ronleigh.info/autolisp/index.htm

 

 

Explanation of a LISP function (Text replacement):

http://www.cadtutor.net/forum/showpost.php?p=264546&postcount=15

 

 

Explanation of a LISP function (Text Height Change):

http://www.cadtutor.net/forum/showpost.php?p=306576&postcount=14

 

 

Explanation of a LISP function (Reinsert all blocks @ 0,0,0):

http://www.cadtutor.net/forum/showpost.php?p=309366&postcount=15

 

 

Localising Variables:

http://www.cadtutor.net/forum/showpost.php?p=265649&postcount=4

 

 

Car/Cadr/Caddr Explained:

http://ronleigh.info/autolisp/afude09.htm

http://www.theswamp.org/index.php?topic=31473.0

 

 

Varying ways to Change Text Height:

http://www.cadtutor.net/forum/showpost.php?p=296877&postcount=4

 

 

Explanation of the Apostrophe:

http://www.cadtutor.net/forum/showpost.php?p=258390&postcount=20

 

 

Explanation of Logand/Logior:

http://www.cadtutor.net/forum/showpost.php?p=298061&postcount=8

 

 

Explanation of Conditionals (CAB/Lee Mac)

http://www.cadtutor.net/forum/showpost.php?p=173196&postcount=10

http://www.cadtutor.net/forum/showpost.php?p=240943&postcount=2

http://www.cadtutor.net/forum/showpost.php?p=273108&postcount=12

 

 

Ok, thats perhaps a few more than you need - but there is quite a lot of useful stuff in there.

 

Lee

Posted

Cheers Lee! They'll keep me busy :wink:

Posted

No worries mate - and if you have a question about anything posted in any of those links, just ask :)

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...