****** Toolbar Macros ****** ...sent by Jon Bowen --------------------------------------------- To use and create button macros:- Right click once on the grey part of a toolbar to call up the toolbar dialog box. If you want to create an entirely new toolbar, click on 'NEW' and give it a name. It will appear on the screen as an empty toolbar. To create a new button, click on 'CUSTOMIZE' A dialog box with all the available buttons in it will appear. If you want to make a new button, scroll to 'CUSTOM' and drag the blank button to the tool bar that you want it to be in. Close all the dialog boxes, and then right click three times on the new blank button. A new dialog box will appear, which you can fill in. Give the button a name, which will appear as the tool tip when you use the button, and a 'help' which is what will appear at the bottom of the screen to remind you what it is that the button does. Copy one of my macros, or make one of your own up. Its a bit finicky sometimes to get the result you want, but not too difficult. Modify one of the below if you like. The fun bit is when you click on 'EDIT', and here you can design the picture to go on the button. Make sure you save it as 'SAVE AS' with a new filename, or you will overwrite an exisiting one. Close all the dialogs down, and you should have a handy new command. Or you will have spent half an hour trying to get a macro to work, and then find you never use it.... These are the macros I find using a lot. If they don't work, try adding a space at the end, which ACAD interprets as 'enter'. R14 already has some of these functions out of the box, but as I usually use LT, some of these are my attempts to get R14 commands into LT. -- Jon D. Bowen --------------------------------------------- OFFSET AND CHANGE LAYER. This one offsets something as normal, but then changes the new entity to the current layer. ^C^Coffset \\\^C^Cchange last p layer $m=$(getvar,clayer) (two spaces at the end) QUICK LEADER MACRO. This is an attempt to bypass those irritating questions that come up every time you use the leader command. It will draw a straight forward arrow, and then let you stick a polyline on the end to where you like. Modify it to the leader settings you prefer.Put a space at the end.:- ^C^C-layer set dims;^C^Cleader \\;;none color yellow pline @ width 0 0 pline color byblock CHANGE TO LAYER MACRO. Make sure you put TWO spaces at the end of this one. you can either have this as a button to switch to a well-used layer, or insert it before a command to make sure you are always in the right layer. This example switches to the 'DIMS' layer, which I use to make sure I'm in my dimension layer when dimensioning a drawing:- ^C^C-layer set dims; EXTEND TO INTERSECTION MACRO. This is just a zero rad fillet. Make sure you have a space at the end:- ^C^Cfillet rad 0 fillet SWITCH TO PSPACE,ZOOM EXTENTS,PURGE AND SAVE IN ONE GO MACRO. This is a sequence of commands I always go through when saving a drawing. Just lets me do it in one hit. Put a space at the end.:- ^C^C_pspace zoom extents purge all n save SWITCH TO PSPACE, AND PLOT MACRO. Its easy to forget to switch to paper space before plotting. This does it for you, and shows you a preview of what your going to plot:- ^C^C_pspace preview NO TRIM FILLLET. Prompts you for a fillet radius, then draws it without trimming the exisiting lines. Put a space in the end.:- ^C^C_fillet rad \fillet trim notrim RADIUS PROMPTING FILLET. With this you will always be prompted for a fillet rad, so you can easily put in a new value, or accept the existing. Handy if you use zero rad fillets a lot:- ^C^C_fillet rad \fillet CREATE AND SET LAYER MACRO, EXAMPLE FOR NOTES. This creates a layer with the specified name, and then swithes to it. I can't work out how to load the linetype I want though, so centreline layers are annoying. This example creates and switches to a layer called 'NOTES' in cyan. Modify it to suit yourself. : - ^C^C-layer new notes color cyan notes set notes ; CREATES A DIM LAYER,AND THEN ACTIVATES THE DIMENSIONING TOOLBAR. This creates a DIMS layer if one doesn't exist, and then simply toggles the dimensioning toolbar on or off : -^C^C-layer new dims color cyan dims set dims ;^C^C_toolbar;ACLT.TB_DIMENSION;; EXTEND TWO LINES TO A COMMON INTERSECTION. Another way of making zero rad fillets.Two spaces at the end. : - ^C^Cfillet rad 0 fillet trim trim LOCK ALL LAYERS EXCEPT THE SELECTED ONE. This is handy if you can never remember whats on what layer, and you want to quickly have a look. It will turn off every layer except the one you select. : -^C^C^P_ai_molc ^P\-layer lo * u $m=$(getvar,clayer);; UNLOCK ALL LAYERS. Turns everything on, except frozen layers:-^C^C-layer u * ; DISPLAY INFORMATION, CHANGE THE DIESEL STRINGS TO SUIT. THIS SHOWS DATE,TEXTSTYLE,LAST DISTANCE, AND OFFSET DIST. This can be handy. Displays useful information in the bottom of the screen. Change the variable names,(here it is date,textstyle,distance and offset values) to give you info you may find handy. This does not automatically update though, so make sure you click on the buttont to get the latest values.:-^C^CModemacro; $M=$(edtime,$(getvar,date),DD"."MO"."YY) $M=$(getvar,textstyle) Dist=$M=$(getvar,distance) Oset=$M=$(getvar,offsetdist) ; TURN OFF THE SELECTED LAYER, AND SWITCH TO LAYER 0. This turns off the layer you select, and then switches to layer 0( or any layer you like by changing the name.): - ^C^Cai_molc ^P\-layer off $m=$(getvar,clayer) y;;clayer 0 TURN ON ALL MY FAVE SNAPS. These are the osnap settings I use most. This will turn them all on with one click:- '-osnap end,mid,int,cen,nod,qua,per,tan,nea Use and abuse!