TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ELOQUINTET on August 30, 2004, 10:23:40 AM
-
i was just wondering has anyone ever written some kind of a lisp for drawing blocking, essentially a rectangle with an "x" inside?
-
Do you mean a CMU (concrete masonry unit) block? Or something like have the lisp draw a rectangle then fill it in with an X?
-
You try it.
Use, getpoint, car, cadr, caddr and/or cdr and the + & * operators. Then, look into command.
Those ought to get you a good start.
-
just plain ole wood blocking draw a rectangle with an x . i just get sick of drawing it all the time
-
Dan,
If you know how to use SETQ then I'm sure you can whip up an X-in-rect lisp in a matter of minutes.
As Daron hinted, GETPOINT is used to retrieve a point on screen (you need two of those to describe the diagonal in a rectangle) and CAR/CADR/CADDR are used for extracting X, Y and Z coordinates, respectively. When having two points that describe a diagonal, you have essentially defined all four corners of the rectangle. All it takes to complete it is a bit of coordinate extraction.
-
http://www.afralisp.com/lispa/lisp171.htm
-
just plain ole wood blocking draw a rectangle with an x . i just get sick of drawing it all the time
Ummm... back when were were doing 2D, we made a "unit block", a 1"square with the "X" in it. Then used a menu pull-down to insert it with different X and Y factors based on the lumber dims. Using blocks is more memory-efficient.
-
ok thanks guys, was just wonderin if someone had already done it not a biggie but i'll read up on it. don't have time right now to come up with anything
-
ok thanks guys, was just wonderin if someone had already done it not a biggie but i'll read up on it. don't have time right now to come up with anything
if you don't have the time, I'll write one for you...give me 10 minutes...
-
yeah i thought of the block idea cadaver i have similar generic things like angles channels what have you in my template. it was just a passing thing i was wondering if someone had already done.
-
Yes, but it's one of those first things they teach you in school, when they teach you lisp. I thought it should be easy enough that you'd do yourself a world of good to try and figure this simple task out for yourself. Not to appear to have any hard feelings, I just feel that you should begin to make lisp happen for you. You've seen enough code, that if you were to open the vlide, test out a few lines of code and read the help files, the light would start to come on for you. Then those more difficult tasks you've asked for in the past would be less of a challenge for you. At the same time, doesn't Stig have a beginners tutorial on his site, using arc's or something of that nature? If so, you might look into it to get your feet--wait- your feet are wet, the rest of your person wet in lisp.
-
I was making a dialog box for ya on this one...Daron is right, should try it out yourself...but if you need it and don't have the time, I understand and I'll give you what I came up with...but you would learn so much more to write/test it yourself...let me know if you want it.