|
ACAD Newsletter Vol 05 No 09
|
jos vandoorn
|
Apr 29, 2005 22:17 PDT
|
-------------------ACAD newsletter---------------------
Newsletter about AutoCAD and AutoLISP
-------------------------------------------------------
Vol 05, No 09 May 2005
-------------------------------------------------------
-------------------------------------------------------
For best viewing maximize the window to full size
-------------------------------------------------------
In this issue I have prepared for you....
1. Top Sponsor Section
2. Notes from the Publisher
3. Simple AutoLISP 2
4. Paper Space in AutoCAD 2005 5
4. Privacy Policy, Legal Stuff and Advertising Info.
5. Contact Information
*******************************************************
*******************************************************
*******************************************************
-------------------------------------------------------
1. Top Sponsor Section
-------------------------------------------------------
SKB found out how to do it
Dear Reader,
SKB was creating AutoCAD drawings of shutters and steel
doors. Old drawings were used. Sizes were changed.
Still creating drawings took a long time.
Then they found how to do it much better. They found
how they could create their AutoCAD drawings within one
minute.
Do you want to know what SKB found out? Of course. Take
action. Send an e-mail to:
mailto:acadprog-@hotmail.com
Write "SKB" in the suibject line. You can also
give me a call. In Malaysia. This is my number:
012-9312742.
Sincerely,
Jos van Doorn. AutoCAD specialist and AutoLISP
programmer. Also publisher ACAD Newsletter. About
AutoCAD and AutoLISP. FREE. To subscribe send a blank
e-mail to:
mailto:acadnewslett-@hotmail.com
P.S. I'm very much in AutoCAD. I helped SKB with
speeding up AutoCAD. And a lot of other
companies. I can also help you.
P.P.S. You were looking for a draftsman. That's how I
found your e-mail address. With AutoCAD speed
up you don't need an erxtra draftsman.
*******************************************************
*******************************************************
*******************************************************
-------------------------------------------------------
2. Notes from the Publisher
-------------------------------------------------------
Most Powerful
That sentence makes you think. I was reading an e-book.
The e-book started with this sentence:
This is the most powerful newsletter issue I have ever
written.
You know. I'm writing a lot. I'm also writing a
newsletter. This newsletter. Calling it powerful. The
most powerful.
I wouldn't dare to call my newsletter powerful. Let
alone calling it the most powerful newsletter. I have
ever written.
But I found something in the e-book. How you can get
what you want. You must take a pen and paper. And sit
in a corner where you're not disturbed.
Next write down everything you ever wanted. That could
be a Mercedes, a trip to Paris, a big house, a
beautiful ...
I must read the e-book. When they start talking about
how you can get the things you always wanted. Excuse
me. I'm in.
Promise. I'll read the book. And I'll tell you what I
found in the book. Together with the number of my bank
account. In Switzerland.
Have a good read. Even if you're not interested in the
number of my bank account in Switzerland.
Jos
*******************************************************
*******************************************************
*******************************************************
-------------------------------------------------------
3. Simple AutoLISP 2
-------------------------------------------------------
We have seen how lines were drawn in the AutoCAD
drawing. For drawing the lines a function was used.
Four calls were made to that function.
We now have a cross to draw. We draw the cross using a
function. In our simple AutoLISP routine we only work
with functions.
To the main function we have added the following line.
In the lien a call is made to the function for drawing
the cross.
(cross (list 20 30))
And this is the function for drawing the cross.
1. (defun cross (pt)
2. (command "line" pt
3. (setq pt (polar pt
4. 0
5. 20
6. )
7. )
8. (setq pt (polar pt
9. (* pi 0.5)
10. 10
11. )
12. )
13. (setq pt (polar pt
14. 0
15. 10
16. )
17. )
18. (setq pt (polar pt
19. (* pi 0.5)
20. 20
21. )
22. )
23. (setq pt (polar pt
24. pi
25. 10
26. )
27. )
28. (setq pt (polar pt
29. (* pi 0.5)
30. 10
31. )
32. )
33. (setq pt (polar pt
34. pi
35. 20
36. )
37. )
38. (setq pt (polar pt
39. (* pi 1.5)
40. 10
41. )
42. )
43. (setq pt (polar pt
44. pi
45. 10
46. )
47. )
48. (setq pt (polar pt
49. (* pi 1.5)
50. 20
51. )
52. )
53. (setq pt (polar pt
54. 0
55. 10
56. )
57. )
58. "c"
59. )
60. )
The name of the argument is PT. That name is also used
for the variable that has the value of a point that has
been calculated.
In line 58 is the argument "C". With that argument a
closing line is drawn from the position of the line
command till the starting point.
With that argument the LINE command is also terminated.
That's exactly what we want after drawing the cross.
Now let's go to drawing the circle.
Here's the function for drawing the circle. It's pretty
straight forward. The circle command works with two
arguments.
First the center point of the circle is given. And then
the radius of the circle is entered. Check in AutoCAD
whether that's true.
1. (defun drcir (pt)
2. (command "circle" pt
3. 30
4. )
5. )
In the main function we must make a call to the
function for drawing the circle. The call is made in
this line:
(drcir (list 30 50))
Now we're drawing the four arcs. Of course we have a
function for drawing the arcs. But let's have a look at
the arguments of the ARC command.
If we invoke the ARC command in AutoCAD there is asked
for a starting point. This is the prompt that is
displayed:
Specify start point of arc or [CEnter]:
We can enter a starting point. We pick a point in the
screen. The next prompt is displayed. This is the next
prompt:
Specify second point of arc or [CEnter/ENd]:
Here we have three options. We can enter a second
point. or we can go for entering a center point or an
end point.
Here I want to enter an endpoint. I enter "E" art the
prompt. That's the second argument of the ARC command.
This prompt is displayed:
Specify end point of arc:
The end point is entered. And the alt prompt of the ARC
command is displayed. Now there is asked for the center
point of the arc.
Here's the last prompt of the ARC command. After
entering the center point the arc is drawn.
Specify center point of arc or [Angle/Direction
/Radius]:
Now that is very clear. The ARC command has got four
arguments. At least for the way we're using that
command.
The first argument is the start point. The second
argument is "E". The third argument is the end point.
And the last argument is the center point.
One more thing. I presume that you still have the
default angle direction. The arc is drawn counter
clockwise.
Here's the function for drawing the arc:
1. (defun drarc (p1 p2 p3)
2. (command "arc" p1
3. "e"
4. p2
5. p3
6. )
7. )
The function has got three arguments. The first
argument is the start point. Next we have the end point
and the center point.
In the main function we must make four calls to the
function for drawing an arc. These ,lines are added to
the main function:
(drarc (list 0 100) (list 0 0) (list 30 50))
(drarc (list 0 90) (list 0 10) (list 30 50))
(drarc (list 60 0) (list 60 100) (list 30 50))
(drarc (list 60 10) (list 60 90) (list 30 50))
Finished. We have created our simple AutoLKISP routine.
We have seen how that is done. And how we can use
AutoCAD commands in AutoLISPO.
I hope you have learned something. And you're
confident enough to create your own AutoLISP routine
that use AutoCAD commands.
In the next article I'll give you the complete listing.
*******************************************************
Writer of this article is Jos van Doorn.
Once you start with AutoLISP, you will be saving lots
of time and money with AutoCAD. Don't know AutoLISP?
Here are the books for learning.
http://autocadbooks.topcities.com
*******************************************************
*******************************************************
*******************************************************
*******************************************************
-------------------------------------------------------
4. Paper Space in AutoCAD 2005 5
-------------------------------------------------------
We started with talking about paper space in AutoCAD
2005. You’ve had the first part, the second, the third
part, and the fourth part. Here’s the last part.
The whole drawing has been dimensioned. The detail has
also been dimensioned. But the dimensions of the detail
didn’t show up in the drawing.
Wait. I know. You've got a question. Suppose your
drawing has got a scale of 1:10. Or any other scale.
How do you deal with that one?
Easy. You saw what I did. I scaled the drawing in the
first viewport. I entered 1XP for the scale factor. In
the ZOOM command.
If my drawing has got a scale of 1:10. Then I enter
0.1XP for the scale factor in the ZOOM command. That’s
how it is done.
Now how do you work with paper space? Create you whole
drawing in model space. Add hatches to your drawing and
whatever fancy thing you want.
When in paper space add text and dimensions to your
drawing. You don’t have to worry about the scale of the
drawing for the sizes.
Good luck with paper space.
*******************************************************
Writer of this article is Jos van Doorn.
Once you start with AutoLISP, you will be saving lots
of time and money with AutoCAD. Don't know AutoLISP?
Here are the books for learning.
http://autocadbooks.topcities.com
*******************************************************
-------------------------------------------------------
5. Privacy policy, Advertising Info, and Legal Stuff
-------------------------------------------------------
This newsletter is only sent on request. Our list of
subscribers is strictly confidential. That means that
your details have never been and never will be passed
on to any third party.
Your privacy is greatly respected. Should you ever wish
to unsubscribe, full instructions are always provided.
To subscribe:
mailto:acadnewslett-@topica.com
To unsubscribe:
mailto:acadnewslette-@topica.com
Previous issues of the newsletter can be seen at:
http://www.topica.com/lists/acadnewsletter/read
Advertising info:
If you wish to advertise in this newsletter, you
shouldn't wait a second longer. Ad rates now are the
lowest for the season.
The ad rates are:
Top sponsor message: $5 per issue
Ad in the sponsors section: $2 per issue
The ad guidelines are:
Ads have to be up to 5 lines including a URL and a
mail to tag. Each line can have up to 55 chars max.
Legal stuff:
ACAD newsletter publishes original content and tips
that are distributed by readers. ALL of our articles
are original and copyrighted by Jos van Doorn.
If you wish to publish any of the content here in your
newsletter please contact Jos van Doorn at
mailto:acad-@hotmail.com
He's the publisher of this newsletter. Write PUBLISH in
the subject line.
Reprinting or reproducing this newsletter can be done
only if you keep it all together. You may NOT reproduce
any part of this newsletter in a way without a written
permission from Jos van Doorn. The signatures are to
be kept intact.
More stuff:
In the archive you can find ll back issues of the ACAD
Newsletter. This is the web site address where you can
find the archive:
http://www.topica.com/lists/acadnewsletter/read
At the web site of the ACAD Newsletter a lot of
applications can be found. There you can also find back
issues bundled in PDF files. Here's the web site:
http://groups.yahoo.com/group/acadnewsletter/files
-------------------------------------------------------
Disclaimer:
ACAD newsletter accepts no responsibility whatsoever
for the content or legality of any customer's
advertisement shown in any e-mailing.
It is the advertisers' responsibility to check and
abide by the Local, State, Federal and International
laws pertaining to the products, services or business
opportunities they advertise, as well as all laws
pertaining to the products, services and/or business
opportunities promotions.
All offers in this publication, are void where
prohibited by law!
*******************************************************
*******************************************************
*******************************************************
-------------------------------------------------------
6. Contact Information
-------------------------------------------------------
Jos van Doorn - publisher ACAD newsletter
Jalan Watan 12
CA-4-24
68000 Bandar Baru Ampang
Malaysia
(03) 42706214
mailto:acad-@hotmail.com
*******************************************************
*******************************************************
*******************************************************
_________________________________________________________________
Find love online with MSN Personals.
http://match.msn.com.my/match/mt.cfm?pg=channel
|
|
 |
|