From Cheap Tricks, Mar 94 Issue

Now updated for DataCAD 8 & up
Published By:
Shu Associates, Inc.
120 Trenton St., Melrose, MA 02176-3714
(617)662-0020 (FAX Same) 
eshu@world.std.com


Keyboard Macros

In DataCAD, there are two types of keyboard macros. The first type are called Keyboard Interrupts, and they are fixed (unchangeable) within the program. You access these by hitting either lower or upper case letters or numbers on your keyboard. For example, if you hit "m", you will immediately be taken to the Move menu. And if you hit "M", you will be sent to the Macros menu. The programmers at DataCAD seem to take particular delight in reorganizing these with every major release, so that we have to get used to a whole set all over again. In general, you cannot change these, although you can adjust them slightly by altering the DCAD.MSG file--but kids, don't try this at home, unless you really know what you are doing.

However, the second type of keyboard macros, called clearly enough, keyboard macros, are the type that DataCAD is happy for you to change. These macros are all accessed by hitting the ALT key in combination with a letter key. All these commands are kept in the file DCADWIN.MCR (formerly DCAD.MCR) in your DATACAD\SUP (or Support Files) directory/folder. What you need to do first is to figure out what you want to define as your various keyboard macros from A to Z, either accepting the pre-defined ones and/or redefining the ones they have that you probably will never use. Check all the ALT keys on the ruler template that DataCAD issued with 4.0 or in Appendix C of the manual. (For DataCAD 5 and up users, refer to "Quick Reference Card" showing "Immediate Mode Commands".

You may decide, "Who needs Alt-H to go to the Freehand Menu?" and prefer that it take you directly into the doors menu, for example. As you go through the list, try to match your new function desires with easy to remember letter cues. (e.g. We customized our Alt-W keyboard macro to go into the Windows menu.)

For each of the macros which you wish to change, the next step is for you to write down the steps, one by one, to get to the exact menu you want. Use semicolon (;) to indicate the Edit Menu and colon (:) to indicate the Utility Menu. Each menu selection is indicated by noting the F key (or S key--which is Shift F key, by the way) which is next to your selection. Because of the way DataCAD allows you to select values by the same F-keys, you can also automatically plug in numbers as well. For example, you could have one keyboard macro which turns on walls with Clean On and with wall width preset to 8".

Next you must go into your ASCII text editor (EDIT, Notepad, or other word processing program, saving out as an ASCII or text only file) and pull up the DCADWIN.MCR file.

After the letter of the keyboard macro which you wish to change, type in the steps which you wrote down earlier, in the fashion as shown in the example below:

U ^ __ ^ __ ^ ; ^ F0 ^ S8 ^ S2 ^ F1 ^ __ ^ __ ^
(Note ASCII code characters cannot be shown in this format but can be added per below.)

(You actually type in the following:) U ^ ALT 183 ^ ALT 200 ^ ; ^ F0 ^ S8 ^ S2 ^ F1 ^ ALT 184 ^ ALT 201

This macro is one we use to take us directly to the Change Text Contents Menu selection. The circumflex (^), usually SHIFT-SIX, is used to separate your command selections. The hieroglyphics, which will appear when you type in the ALT (holding it down) and Numeric Pad numbers, (NOT your numbers at the top of the keyboard), are special control codes which will turn off and then back on the menus (ALT 183 & 184) and the messages (ALT 200 & 201). You can use them or not. If you are unsure of what you are doing, do not use them. Your macros may be a little bit slower, but you will be able to see exactly where it is going and what it is doing.

So that you can get a better sense of what you can accomplish with these, here are a few more examples. From Bruce Kaplan, here's a useful macro for identifying an entity and making the layer that it is on, active:

I ^ ALT 183 ^ ALT 200 ^ ; ^ S1 ^ N ^ F2 ^ S0 ^ ALT 184 ^ ALT 201

Note that "N" signifies another keyboard macro (interrupt) activating the nearpoint function. (Make sure your layer snap is on or it won't work.) So you see you can nest other keyboard macros within your new macro to save you steps!

For going directly into Rick Gleason's great Set-Text Macro:

T ^ M ^ SET-TEXT$ ^

(Here M is the keyboard interrupt to go to the Toolbox (Macros) menu and note that the dollar sign ($) signifies hitting ENTER.)

NOTE: This column is a special reprint excerpt from Cheap Tricks, the monthly resource for DataCAD user. Reprints by permission only.


To go back to the Reprints Page

How to Subscribe

Shu Associates Inc.

120 Trenton St.
Melrose, MA 02176-3714
(617)662-0020 Tel & Fax

You can E-mail us by clicking here: eshu@world.std.com
Copyright © 1997, Shu Associates Inc.
Revised -- 8/1/2004

URL: http://world.std.com/~eshu/cheap/keymac.htm