|
|
Automating AutoCAD 2 |
November 2003 |
This month follows up with the next level of tool-making in which you create
your own tool, button image included. It’s quite fun, really, and once
you have learned the key features of this customizing procedure, you will find
many opportunities to give it a try. I also have included another real-time application
involving the fundamentals of paper space, along with some insights into what
I refer to as the poor man’s document management utility: Hyperlink. For
those of you needing to run area calculations, take a look at this month’s
Basics section. Carry on!
You can contact Michael by email and be sure to visit his website, www.autocadtrainerguy.com for additional AutoCAD insights. If you have ideas about what you would like to see covered in 'Michael's Corner', he'd love to hear from you.
|
Tool Time: Kick ‘em Up a Notch
Making a Power Tool
1. To make your own tool open the ‘Customize’ dialog box, then choose ‘User defined’ at the bottom of the Categories column.
2. From the Commands column, drag the ‘User Defined Button’ onto your toolbar.
3. Click on the blank tool on your toolbar and the Customize dialog box automatically switches to the Button Properties tab.
4. Enter a Name and a Description for your tool. The Name is for the tooltip; the Description will be displayed on the status bar.
5. In the Macro area, type the name of the command you want to run with this tool.
Tip: When writing the macro for a custom tool, the semi-colon “;” means <Enter>.
^C^CVpoint;-4,-5,1;Z;.5x;Hide
This routine:
Cancels any currently running command (^C^C), then…
Issues the Vpoint command, then…
Enters the x,y,z values of -4,-5,1 then…
Launches Zoom, then…
Specifies a reduction of 50%, then…
Launches Hide.
6. To create the button, click the Edit button under the empty button image to open the ‘Button Editor’ dialog box.
7. Turn the Grid on, grab a color, pick a tool and off you go. If you make a small mistake, click Undo. Click Clear if you want to start over.
Tip: When you’re finished with your graphics, click Save As, navigate to the desired folder and give this .bmp a name that you will understand.
8. After saving the button image by name, click Close to close the Button Editor.
9. Choose Apply at the bottom of the ‘Customize’ dialog box, then Close out of the Customize dialog and you’re finished!
|
The Odd Spot
Remember Tilemode?
Once upon a Release 11-14, to switch over to “Paper
Space” (now known as a Layout for those of you just joining us), you
changed the Tilemode variable. When Tilemode was set to 0, the Paper Space
environment was set to current. Set the Tilemode variable to 1 and the environment
switches over to Model Space. This is the same as clicking on the Paper or
Model button on the A2000-A2004 status bar.
What I discovered recently working on a drawing with about 25 layouts is that
this variable can be extremely helpful if you are, let’s say, about
20 layouts into the multi-tab layout list and you want to jump over to Model.
Rather than scrolling back to the Model tab, simply enter the default alias
of TM for Tilemode, then enter 1. Once you have finished with your needs
on the Model tab, use TM and enter 0 … to return to the same Layout!

For those of you on A2004: If you have AutoCAD 2004, it would appear as though
Autodesk recognized this need to go back to the previous layout (better late
than never, I suppose). Right-click on the Model tab and choose ‘Activate
Previous Layout’!
Free subscription to ‘The AutoCAD Toolbelt’ offer:
The first email to michael.beall@autocadtrainerguy.com telling
me the command (and the resulting file extension) by which you can take a ‘snapshot’ of
the current screen image that can be replayed in a script (.scr) will receive
a complimentary one-year subscription (8 issues) of my newsletter, ‘The
AutoCAD Toolbelt’.
STOP PRESS - Winner
The winner of this month's Toolbelt offer is Michael Burke with Beazer Homes
in Raleigh, NC - well done! The answer is, Mslide is the command that creates
a .sld file.
|
Power Tool
Hyperlink for document management
Wouldn’t it be cool if you could launch one drawing from within another one. Or how about automatically going to a website containing product specification.
A. Click the ‘Insert Hyperlink’ tool on the Standard toolbar (Ctrl+K or Insert/Hyperlink in A2004).

B. Select the object to receive the hyperlink, then press <Enter> to open the Insert Hyperlink dialog.
C. Enter the internet URL or click the File button to select a file … any file!
D. Change the ‘Text to display’ to something more concise.
E. Choose OK, then hover over the object to see the hyperlink tip.
F. To open the linked file, select, then right-click on the hyperlinked object, then choose Hyperlink/Open…

|
The Basics: Area Additions and Subtractions
Whether you’re calculating areas on a corporate office floorplan or the
total material area for a plate, the Area command can help.
The procedure will go much more smoothly if the bounding area and any internal
shapes are polylines. In floorplans, you may want to consider using the Boundary
command, or you could use Osnap and create a polyline on a separate layer.
To calculate the total area of the plate, (subtracting the area of the seven
circles), do this:
1. Launch the Area command and begin with the Add option. This establishes
the bounding area from which you will subtract the internal objects.
2. Since the object is a Polyline, use the Object option and select the object,
then AutoCAD will display the following information:
Area = 18.0882, Perimeter = 17.8008 Total area = 18.0882 (ADD mode) Select objects:
If you don’t have a pline to select, the prompt to ‘Specify first
corner point’ provides a method by which you can pick the points on the
perimeter of the area to be calculated.
3. Press <Enter> to end the ADD mode, at which point you will have
an option to Subtract.
4. With the Subtract option, select each of the objects (or circles in the
case of this example), and AutoCAD maintains a running tally of the Area of
the object selected and it’s perimeter, as well as the Total Area after
the subtraction.
(SUBTRACT mode) Select objects: Area = 0.0928, Circumference = 1.0799 Total area = 17.5314
|
|
|
|
|