home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
GR
/
GR506.ZIP
/
ACAD2.EXE
/
CADWRITE.DOC
< prev
next >
Wrap
Text File
|
1987-08-25
|
9KB
|
199 lines
CADWRITE
by Eric D. Brown
Version 1.0
Copyright (c) 1987 All Rights Reserved.
CadWrite is a shareware program which will take a text file
and create an AutoCad compatible DXF file which may be read into
an AutoCad drawing. This was tested with version 2.6 but should
work with previous versions.
Currently, CadWrite does not support WordStar or Word
Perfect files. It will only work with pure text files. If there
is adequate response, I will consider writing a new version of
the program which will translate word processor files.
CadWrite was written in Turbo C in the tiny model and
optimized for size. CadWrite requires a math coprocessor and MS-
DOS or PC-DOS and will run on most IBM PC compatibles.
I have written this program with the intent of adding it as
an external program which would be callable from inside an
AutoCad drawing. If your version of AutoCad supports AutoLisp,
you can use the lisp program in the file CADWRITE.LSP to access
the program and to insert the resultant DXF file into the current
drawing.
RUNNING CADWRITE
CadWrite is invoked with the command:
CADWRITE [insertion point]
where the insertion point is specified as one argument with the X
and Y components separated by a comma. This is compatible with
AutoCad's "getpoint" function using AutoLisp. If no insertion
point is provided, the point 0,0 is used. As an example, the
following command will invoke CadWrite with an insertion point of
1,1.
CADWRITE 1,1
The insertion point is used to calculate the starting point for
the first line of text by subtracting the line spacing from the Y
value. The starting location of subsequent lines will be
calculated in the same way. CadWrite automatically creates a
file named $CMD.DXF as output. This file must be loaded into
your drawing using the DXFIN command.
After CadWrite is invoked, you will be prompted for the text
file, the height of the text, the X scale factor, the obliquing
angle, the text style, and the vertical spacing. You may respond
to each by hitting return to accept the default value. These
items are similar to the normal text command with the exception
of the line spacing. Normally the font file, which is specified
by the style command, provides the line spacing information but,
this information is not available when the DXF file is created.
Therefore, you may input the vertical spacing as a fraction of
the text height. The default value is the spacing used in the
Copyright (c) 1987 CadWrite. All Rights Reserved.
CadWrite page 2
"TXT" font and should work for most other fonts. If you wish to
specify your own value, it should be greater than 1.0 or the
lines of text will overlap.
ACCESSING CADWRITE FROM INSIDE AUTOCAD
To invoke CadWrite from AutoCad the ACAD.PGP file must be
edited to include the line:
READTEXT,CADWRITE,125000,*insertion point: ,0
this tells AutoCad that the command READTEXT is used to invoke
CadWrite and AutoCad will prompt for an insertion point to be
added to the command line. It also indicates that 125000 bytes
of memory are to be released for CadWrite's use. Refer to your
users manual for more information.
As noted above, the entire process may be automated using
AutoCad's AutoLisp feature with the lisp program I have provided.
If you are using the standard AutoCad menu (ACAD.MNU) you may add
this directly to the menu. Please read your users manual's
section regarding the customizing of the menu before trying this.
The following is a sample menu which is accessed from the utility
menu by selecting the "external commands" item (version 2.6).
**EXCOMDS 3
[CATALOG]CATALOG
.
.
.
[TYPE:]TYPE
[READTEXT:]+
(setq rt1 (getvar "CMDECHO"))+
(setvar "CMDECHO" 0)+
(setq insptrt (getpoint "insertion point: "));\+
(command "readtext" insptrt)+
(setq dxfrt "$cmd")+
(command "dxfin" dxfrt)+
(setq dxfrt "erase $cmd.dxf")+
(command "sh" dxfrt)+
(setvar "CMDECHO" RT1)+
(graphscr)
The items from "[READTEXT:]+" through "(graphscr)" are to be
added to the existing EXCOMDS submenu and is similar to
CADWRITE.LSP. This allows you to select the insertion point as
you would if you where inserting a block and, it erases the DXF
file when it's finished. You may wish to use the lisp program I
have provided if you normally type in the commands from the
keyboard or can't modify the menu. To do so type in the
following at the "Command:" prompt.
(load "cadwrite")
cadwrite
Copyright (c) 1987 CadWrite. All Rights Reserved.
CadWrite page 3
LICENSE AND SUPPORT
You may copy and distribute this program freely, provided
that:
1) No fee is charged for such copying and distribution, and
2) It is distributed ONLY in its original, unmodified
state.
If you like this program, and find it of use, then your
contribution will be appreciated. If you are using this product
in a commercial environment, then the contribution is not
voluntary.
AutoCad and AutoLisp are registered trademarks of Autodesk
Inc. IBM is a registered trademark of the International Business
Machine Corporation. MS-DOS is a registered trademark of
Microsoft Inc.
Copyright (c) 1987 CadWrite. All Rights Reserved.
You are free to use, copy and distribute CadWrite for non-
commercial use IF:
NO FEE IS CHARGED FOR USE, COPYING OR DISTRIBUTION.
IT IS NOT MODIFIED IN ANY WAY.
Clubs and user groups may charge a nominal fee (less than $10)
for expenses and handling while distributing CadWrite.
Volume discounts, site licenses, commercial licenses and custom
versions of CadWrite are available. Write to the address below
for more information.
This program is provided AS IS without any warranty, expressed or
implied, including but not limited to fitness for a particular
purpose.
If you find this program useful, a contribution of $25 (US)
would be appreciated. With each contribution of $45 or more you
will be registered to receive a diskette with the next version
of CadWrite when available. Please state the current version of
CadWrite that you have. Send contributions to:
Eric Brown
4609 Ellenwood Dr #203
Los Angeles, CA 90041
If you have any questions or suggestions, you may write to
me at the above address or contact me through COMPUSERV EMail
[73537,2542].
Copyright (c) 1987 CadWrite. All Rights Reserved.