Escolar Documentos
Profissional Documentos
Cultura Documentos
1 of 7
http://www.dotsoft.com/procedures.htm
TM
Home
Blog
Forums
Support
Contact
Other
CAD Engines
CAD Productivity
ToolPac
XL2CAD
Word2CAD
SuperScript
Civil/Survey
MapWorks
Gizmo3D
LegalWriter
DWG Compatibles
Excel2DWG
Word2DWG
PDF2DWG
PROCEDURES
AutoCAD Procedures
Usage
You are free to use the information listed here, but it is copyrighted works and
are not public domain. You may not sell, lease, or mass-redistribute this
information on disk or electronically. You may not post this information online
(including web sites, ftp sites, bulletin boards, and other online services) for
public viewing, and you may not publish in print for public viewing without prior
written consent of DotSoft.
Disclaimer
DISCLAIMER: DOTSOFT DISCLAIMS ANY AND ALL LIABILITY FOR ANY
DAMAGES ARISING OUT OF THE USE OR OPERATION, OR INABILITY TO USE
ANY INFORMATION AVAILABLE HERE. FURTHERMORE, BY USING THIS
INFORMATION YOU AGREE TO HOLD DOTSOFT HARMLESS FROM SUCH
CLAIMS. DotSoft makes no warranty, either expressed or implied, as to the
fitness of this information for any particular purpose. All materials are to be
considered 'as-is', and use of any information should be considered as AT YOUR
OWN RISK!
Adding Customization, how to add user lisp and routines to your system.
Excel Scripting, making an AutoCAD Script file from Excel.
Raster Plotting, how to create bitmaps from your drawings.
Text Linetypes, how to create linetypes with embedded letters.
Adding Customization
Users often want to add miscellaneous lisp routines to their system, having
them automatically loaded and available at all times. The intentions of this
procedure is to allow the customization to survive a reinstallation or upgrade of
AutoCAD.
Autoloading of these files will be controlled by a special file called ACAD.LSP,
which will load the custom routines. Note that AutoCAD does not create or use
this file.
1. Create a separate 'unique' subdirectory such as C:\CADSTUFF using
Windows Explorer.
2. Add the directory C:\CADSTUFF to the AutoCAD Support File Search
Paths. For those unfamiliar:
A) Issue the OPTIONS command.
B) Click the Files tab.
C) Expand the Support File Search Path section.
D) Choose the Add button.
E) Choose the Browse button.
F) Navigate to and choose the C:\CADSTUFF folder.
10/5/2015 3:11 PM
AutoCAD Procedures
2 of 7
http://www.dotsoft.com/procedures.htm
3. Place all your LSP and related files into the C:\CADSTUFF directory.
4. Using Windows Notepad (or another ascii editor) create a new file named
ACAD.LSP in the C:\CADSTUFF directory containing a load statement for
each routine to be loaded.
An example is shown in the following lines.
(load "ROUTINE1.LSP")
(load "ROUTINE2.VLX")
Now whenever you start/restart AutoCAD, it will locate the ACAD.LSP file and
load it. Loading of ACAD.LSP will in turn load your designated files. Since these
files are loaded, you will be able to initiate these added commands by typing
the command defined in each routine.
You may also wish to add buttons or aliases to speed up the initialization of
these commands.
Scripting from Excel
This procedure will walk through the process of using Microsoft Excel to create
script files to be read into AutoCAD. Tabular information is often present in the
spreadsheet that needs to be transferred to AutoCAD. The example explained
here is a table of layer names with colors and linetypes. It could quickly be
adapted to use point coordinates to create inserts. This example provides Excel
specific explanations, but users of other spreadsheets should be able to adapt
the instructions to their particular product. The following instructions will
reference the next example.
A
1 PROPOSED
RED
2 EXISTING
GREEN CONTINUOUS
3 ANNOTATION 255
DASHED
CONTINUOUS
3.
4.
5.
6.
7.
It is very important that the spaces be included. Note that just as in the
command line layer command, we must pass the layer name after each
designation such as color to tell AutoCAD to assign that color only to the
current layer. This explains the multiple references to A1.
Copy that expression down to all the valid lines.
Highlight the entire column D and copy it to the clipboard.
Choose File/New to create a new empty sheet.
Choose Edit/Paste Special, choose Values.
Insert a blank row at the top of the file and enter this:
'-LAYER
10/5/2015 3:11 PM
AutoCAD Procedures
3 of 7
http://www.dotsoft.com/procedures.htm
8. Choose File/Save As, choose Save As Type, then choose Text (OS/2 or
MS-DOS)(*.TXT).
9. Enter the script filename such as D:\PATH\FILENAME.SCR.
10. When prompted that the selected format does not support multiple
sheets, choose Ok.
11. Excel has the file locked down in the operating system, and AutoCAD
can't even run it, so we must close it first. Choose File/Close, choose No
to the next dialog. This was just a temporary workbook anyway.
12. Back in AutoCAD, make any preliminary settings as necessary, such as
loading linetypes.
13. Issue the SCRIPT command, choose your script. When its done you will
may have to press enter once.
14. Check the layer table. It should be populated with the information from
Excel.
Creating Text Linetypes
This procedure will walk through the process of creating your own text
linetypes, utilizing the capability introduced with AutoCAD R13. You might be
surprised at how much you can do with this simple customization, especially
when combined with the Windows Wingding Truetype font.
Note that not all details or principals of creating linetypes are presented here.
You should consult the AutoCAD customization guide for full details.
Where definitions are stored:
While linetype definitions can be stored in any file with the LIN extension, you
will probably find it easiest to make your changes to the ACAD.LIN file. This file
is found in your AutoCAD SUPPORT directory. This approach does involve some
recommended backups. First it would be convenient to backup the original
ACAD.LIN file. Second after you get the new linetypes established it would be a
good idea to backup the file again, to protect against overwriting if AutoCAD is
reinstalled.
The easiest approach:
One simple way to create an additional text linetype is to copy one of the
examples in the ACAD.LIN file. We have reproduced a small portion of it here.
*HOT_WATER_SUPPLY,Hot water supply ---- HW ---- HW ---- HW ---A,.5,-.2,["HW",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.2
*GAS_LINE,Gas line ----GAS----GAS----GAS----GAS----GAS----GAS-A,.5,-.2,["GAS",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.25
Notice that the primary difference between these two definitions is the letters
used (HW -vs- GAS) and the last number on the second line. The value was
incremented by 0.05 to accommodate the extra character. You may need to
experiment with this value to determine the right number to produce the
desired gap for the text. A starting point is 0.1 times the number of characters,
as the added WATER linetype works well with a value of -.5.
*GAS_LINE,Gas line ----GAS----GAS----GAS----GAS----GAS----GAS-A,.5,-.2,["GAS",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.25
*WATER_LINE,Water line ----WATER----WATER----WATER----WATER---A,.5,-.2,["WATER",STANDARD,S=.1,R=0.0,X=-0.1,Y=-.05],-.5
10/5/2015 3:11 PM
AutoCAD Procedures
4 of 7
http://www.dotsoft.com/procedures.htm
10/5/2015 3:11 PM
AutoCAD Procedures
5 of 7
http://www.dotsoft.com/procedures.htm
linetype we would first need to create the WINGDING style based on the
Windows WINGDING.TTF font. Then we would add the linetype.
*RIGHT_ARROW,Right arrow ---- > ---- > ---- > ---- > ---A,.5,-.2,[">",WINGDING,S=.1,R=0.0,X=-0.1,Y=-.05],-.2
To achieve the special character enclosed in the quotes, hold down the Alt key
on the keyboard while you enter the numbers 0232 on the number pad, then
release the Alt key.
When the text linetype is loaded and used, it can produce attractive results,
such as the following example.
Note that with this arrow text linetype the arrow will generally point in the
direction that the geometry was drawn. However ARC's will always display
pointing counter-clockwise. For these situations simply generate the left arrow
linetype and change the geometry's linetype.
PLINEGEN plays a part:
You may notice that on polylines that contain arcs that the annotation always
wants to read counter-clockwise even if you reverse the polyline. That is
because the the linetype generation flag for that polyline needs to be turned
on. ToolPac users simply use the ToolPac>Polyline>Ltype Gen>On option and
select the affected polylines.
Centerlines possibilities:
To show the stacked centerline symbol in your linetypes, use the lower case 'q'
in conjunction with the GDT.SHX font. Use the same procedure discussed to set
this up.
Plotting to Raster Files
A popular inquiry from AutoCAD users is how to plot a drawing to a raster file
(or bitmap/picture). This is often in response to the need to provide a 'picture'
of the drawing without actually providing the DWG, or perhaps a drawing is to
be displayed in a web page.
First is the simple to use (but less control) command called BMPOUT. It creates
a Windows Bitmap .BMP file, appropriate for Paintbrush but not ready for a web
page. It captures the whole drawing viewport so center your drawing as well as
possible before issuing the command. The following procedures can be used to
'plot' your drawing to a raster file.
2000+ Users:
Setup:
1.
2.
3.
4.
5.
10/5/2015 3:11 PM
AutoCAD Procedures
6 of 7
http://www.dotsoft.com/procedures.htm
Use:
R14 Users:
Setup:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Use:
1.
2.
3.
4.
5.
Why PNG?
You may wonder why the PNG file was chosen. It is a clean highly compressed
format. In comparison, the JPG (JPEG) format is absolutely NOT a desireable
format for representing linework in raster format. While JPEG is fine for
photographs, it is a 'lossy' compression and will produce noticable 'snow' on
line drawings, especially diagonal lines.
The PNG file is your best choice for raster output. It is very compact in size and
is a 'loseless' compression. It can be displayed by all 'current' web browsers as
well.
10/5/2015 3:11 PM
AutoCAD Procedures
7 of 7
http://www.dotsoft.com/procedures.htm
10/5/2015 3:11 PM