|
ACAD Newsletter Vol 05 No 15
|
Jos van Doorn
|
Aug 02, 2005 19:40 PDT
|
acadnewsletter-@topica.com
ACAD Newsletter Vol 05 No 15
-------------------ACAD newsletter---------------------
Newsletter about AutoCAD and AutoLISP
-------------------------------------------------------
Vol 05, No 15 August 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. Text
4. Privacy Policy, Legal Stuff and Advertising Info.
5. Contact Information
*******************************************************
300.000 WEEKLY SP@M FREE EMAIL LEADS !!!! Not only will
we give you 1.2 million leads a month, we'll also
provide you with a never-ending supply of THOUSANDS of
dollars worth of great software.
http://www.emailloverz.com
*******************************************************
Quality Silver Jewelry At Discount Prices!
http://www.1ststopjewelry.com
At last a Sterling silver jewelry store where you can
save With over 650 products from which to choose, you
can always find that special gift.
*******************************************************
-------------------------------------------------------
1. Top Sponsor Section
-------------------------------------------------------
Two companies
That was five years ago. Two companies. Both were
selling shutters. There business was so so. There was a
lot of room for improvements.
Five years ago. Things have changed since then. One
company is still struggling. The other companies is far
better off.
Five years ago both companies were working with
AutoCAD. Somebody came to them. Wanted to have a
shutter. That was a problem.
Because they had to make a quotation first. And with
the quotation came a drawing. An AutoCAD drawing.
Creating such a drawing took a lot of time.
Both firms heard about programming for AutoCAD. But
only one firm decided to make use of that feature. They
got programs for AutoCAD.
The firm that has got the programs is creating AutoCAD
drawing within one minute. Now they can make much more
quotations.
The other firm is still struggling. They need at least
four hours for a drawing. So they can only make a few
quotations in a day.
Business is very good for the first business. They make
a lot of quotations, they get a lot of orders. The
other business is just surviving.
How is that? Are you struggling too with AutoCAD
drawings? Do you want to improve that? Do you want
programs that speed up AutoCAD?
If so. Take action. Get in touch. And find out what we
can do for you. Easy. Give me a call. In Malaysia. This
is my hand phone: 012-9312742.
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
*******************************************************
What's your Passion? Mel Gibson gave part of the story
now here is the rest!
http://home.comcast.net/~fredandjulia/index.html
*******************************************************
L@@K ---> Make Money Giving Away FREE Satellite TV!
Join this FREE Affiliate Program and earn up to $100.00
commission on your personal sales AND earn commissions
on your Sub-Affiliate sales. Get your Affiliate link
now! To sign-up, please visit:
http://www.cmmei.com/cmmsat.htm
*******************************************************
-------------------------------------------------------
2. Notes from the Publisher
-------------------------------------------------------
Big Mistake
You know. I never went to university. So every now and
then I make a big mistake. The other week. I made a big
mistake. Again.
I was walking in KL. It was hot. No snow. I wanted to
have a drink. I stepped into a restaurant. Not many
people. A guy was sitting there.
This guy was sitting at a table. Wearing sun glasses.
Al Pacino type. With three other guys. They were
talking. Very loud.
I waited at the door. I had a look at those guys.
Especially at the guy with the sun glasses. I was
curious. I walked to him.
I stopped in front of him. I bend a little bit forward.
I had a straight face. And then I asked him: "Are you a
gangster?"
That was a big mistake. That's what they told me later.
The nurse. In the hospital. The man. I talked to. He
was a gangster.
Even if you're no gangster. Have a good read.
*******************************************************
Some internet programs go beyond the call of duty!
****** Not many - Just SOME!******
But only ONE internet program backs it up with a solid
guarantee that you will make a profit. CLICK HERE!
http://www.pr-pl.com/a.php?Ljiame="ad">
*******************************************************
ACHIEVE THE ONLINE RESULTS YOU CAVE. Want more Traffic?
Want more Customers? Want repeat customers? Want move
revenue?
http://www.emarketingwiz.com
*******************************************************
-------------------------------------------------------
3. Text
-------------------------------------------------------
That can happen. You're programming in AutoLISP. And
now you want to do something with text. You want to
give the text a style.
How is that done? How can you give text a style? How
can you create that style? How can you set a style?
What about style?
Let's first have a look at the STYLE command in
AutoCAD. The command can be used to create a text
style.
This is how the SATYLE command works. I've put it all
in a table. In the first column is what has to be
entered.
In the second column is given what the meaning is of
what has to be entered.
Command Description
(command "style" "romans" style name
"romans.shx" font file name
0 height
1 width factor
0 obliquing angle
"n" backwards
"n" upside down
"n" vertical
)
You can check whether the STYLE command works like
this.But don't enter STYLE at the command [prompt. The
Text Style dialog box shows up.
To see how the STYLE command works and what must be
entered, enter -STYLE at the command prompt. The dash
prevents the dialog box from showing up.
If you use the STYLE command in an AutoLISDP program
you must give that command all the arguments, that have
been mentioned.
You cannot skip the height or the width factor or any
other argument. All argument must be entered. Even the
last ones.
One complication. In the STYLE command the name of the
font file is used. But do you know all these names? Can
these names be found out?
Sure. You can easily find out these names. Start with
the Text Style dialog box. Enter STYLE at the command
prompt.
In the Text Style dialog box you can easily select a
text style. When that's done start the STYLE command
again, now without dialog box.
This time don't make any changes. Just click the Enter
key or the right mouse button. The following prompt
shows up:
Specify full font name or font filename <-----.--->:
Between the square brackets is the name of the font
file. That's the name you're going to use for the STYLE
command in your AutoLISP.
For the height zero is entered. Keep it like that. If
you enter zero there, then there's asked for the text
height in the TEXT command.
You can add a line for invoking the STYLE command in
your AutoLISP routine. And you can run the same line
several times.
But it is nicer if there's checked first whether the
text style exists. You can do a search in the database
of AutoCAD.
This is how a search is done and the STYLE command
invoked if the text style doesn't exist. The TBLSEARCH
function is used.
(if (null (tblsearch "style" "romanc"))
(command "style"
"romanc"
"romanc.shx"
0
1
15
"n"
"n"
"n"
)
)
Nice. Now we know how to invoke the STYLE command in an
AutoLISP routine. We can also find out whether a text
style already exists in the drawing.
But suppose we have several text styles. And now we
want to switch from one text style to another text
style. How is that done.
That's done using a system variable. Couldn't you have
thought about that one? The TEXTSTYLE system variable
is sued.
This is how the TEXTSTYLE system variable is sued. It's
name is mentioned in the SETVAR function. And then a
text style is specified.
(setvar "textstyle" "romanc")
Very nice. But we cannot end without some programming.
Let's create a text style and write some text using
that text style.
Here's a little program that does the trick.
1. (defun c:txtst ()
2. (setvar "cmdecho" 0)
3. (setq om (getvar "osmode"))
4. (setvar "osmode" 0)
5. (command "erase" "all" "")
6. (if (null (tblsearch "style" "romanc"))
7. (command "style"
8. "romanc"
9. "romanc.shx"
10. 0
11. 1
12. 15
13. "n"
14. "n"
15. "n"
16. )
17. )
18. (command "text" (list 0 0)
19. 10
20. 0
21. "This is text"
22. )
23. (command "zoom" "extents")
24. (command "zoom" "0.9x")
25. (setvar "osmode" om)
26. (setvar "cmdecho" 1)
27. (princ)
28.)
This is how the program works. We don't want command
echoes. So the CMDECHO system variable is set to zero
at the start.
We don't want a running object snap either. So the
OSMODE system variable is set to zero too. But first
the value is stored in the OM variable.
We will start with an empty drawing. So everything in
the drawing is deleted first. In line 5 the ERASE
command is invoked.
In the lines from 6 till 17 there is first searched for
the ROMANC text style. If it's not found, then it is
created.
In line 10 a height for the to be created text style is
entered. The height is zero. Now we must enter a height
for the TEXT command.
In the lines from 18 till 22 something is written to
the AutoCAD drawing. The TEXT command is invoked. Do
you see what arguments are used?
The height of the text to drawn is 10. That height is
set in line 19. The rotation angle is set to zero. See
line 20.
The text must be fully visible. Isn't that nice. The
ZOOM command is used twice. First a ZOOM EXTENTS is
given and then a scale factor.
Have a nice time with text style and with text.
*******************************************************
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
*******************************************************
*******************************************************
Work from Home Online! Put your computer to work for
you! Earn up to $500-1500+ P/T $2000-5000+ F/T! No
experience necessary. One-on-One Training Provided. Be
your own boss and set your own hours. Go to
www.grabbingsuccess.com today and change your future!
*******************************************************
Achieving your dreams and financial freedom? Want to
bring in some extra income part time? Enjoy all the
benefits of working from home. Have your own personal
mentor & earn a great income building a real business.
Be your own BOSS by Ordering your own risk free pkg.
http://www.Complete123.com
*******************************************************
-------------------------------------------------------
4. 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!
*******************************************************
Magazine subscriptions at rock-bottom prices! We have
over 1100 popular magazine titles in categories of
business, Christian, news, sports, fitness, health,
men, women, children and many more. Low price
guarantee.
www.MaxMagazines.com
*******************************************************
GTS-Global Team Success Connecting People to SUCCESS!
Build a business with us and get your own FREE online
Store and Bonuses. Exceptional Support and Online
training, and more.
http:/www.gt-success.com gt-@gt-success.com
*******************************************************
-------------------------------------------------------
5. 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
*******************************************************
A Unique Opportunity! 300 Million Entrepreneurs MUST
have this right NOW!
http://www.mentorsinprofit.com/lifeconcept more
details:
lifeco-@mentorsinprofit.com
*******************************************************
You have to see this! Learn how you can finally give
your family a total solution. 100% natural food-source
vitamins, chelated minerals, probiotics, digestive
enzymes & anti-oxidants;ALL in one! 100% $$$-Back
Guarantee!
http://www.TakeYourVitaminToday.net GO!
*******************************************************
|
|
 |
|