- The best thing I like in AutoCAD is the power of customization it offers for the end user. By doing so many customizations, you can convert your AutoCAD to a custom product most suitable for your industry. Moreover, the process of customization gets simpler with each new release of the product. Here is a sample tutorial to create a custom double click action which converts a Line to a PolyLine. Please have a look at the image attached below.
The picture itself speaks well about the process. Doesn't it? In case you are unable to make out the process, here goes the steps in detail.
- Open CUI dialog by typing CUI in the command prompt (or Tools -->Customize -->Interface...).
- In the 'Command List' category, click on 'New' button to create a custom command (See the image section 1).
- Type in a name in the 'Name' property field (image section 2) and assign your macro to the 'Macro' property field (image section 3).
- Now the costom command is ready for use. The next thing is to apply this command to the double click action of an entity. For that, expand the 'Double Click Actions' category to locate the target entity (Here we are going to apply it to a 'Line').
- Drag the command using left mouse button and drop it right under the 'Line' category listed under the 'Double Click Actions' (image section 4). Before doing this, take a note of the existing command under the 'Line' category, in case you want to go back to the default command later.
- Now finish the process by clicking apply. Draw a line and double click on it to see how the new settings work. If the settings were done properly, the list command should list the object type as 'LWPOLYLINE'.
The double click macro for converting line to polyline is given below
^C^C$M=$(if,$(=,$(getvar,peditaccept),1),_pedit;,_pedit;;)
The following are some macros I use to make my drafting life easier.
Macro : ^C^C_xopen;
Category : XRef
Description : Opens the external reference source file.
Macro : ^C^C_dimedit;home;cmddia;0;_dimedit;new;<>;previous;;
Category : Dimension
Description : Regains its original dimension value, text position and text orientation
Macro: ^C^C$M=$(if,$(=,$(getvar,peditaccept),1),_pedit;decurve;,_pedit;;decurve;)
Category : Arc
Description : Converts an arc to a straight polyline
Macro: ^C^C$M=$(if,$(=,$(getvar,peditaccept),1),_pedit;close;,_pedit;;close;)
Category : Arc
Description : Converts an arc to a circular polyline
Macro: ^C^C_transparency;on;
Category : Image
Description : Makes an image transparent.
Macro: ^C^C'_.zoom;_o
Category : Applicable to all
Description : Zooms to the double clicked object
Macro: ^C^C_-view;_swiso;'_.zoom;_o;previous;;
Category : 3DSolid
Description : Switches to isometric view of the double clicked 3D object.
I have a few more useful double click actions. But I skip those for the reason that it contains LISP expressions which is not supported in AutoCAD LT. Please note that you can not directly do these things in AutoCAD 2005 or earlier versions. Hope you enjoyed the double click customizations. If you have got any double click actions with you, please feel free share it with me.