As an example, I will show you how to change the double click action of an 'Attribute Block'. Normally double clicking an attribute block shows the Enhanced Attribute Editor Dialog. We are going to change this to show either Enhanced Attribute Editor(_eattedit) or Edit Attributes dialog (_attedit) depending on certain condition. Let's say, when we double click on a title block named TITLE_BLOCK, it should display the Enhanced Attribute Editor dialog and for all other blocks in the drawing, it should display Edit Attributes dialog. The step by step configuration is given below.
- Open CUI and create a custom command with the following code inside the macro section of the command. If you don't know how to create a custom command, then refer to the 'Unleash the Double Click Power' post mentioned above. Replace the 'TITLE_BLOCK' inside the following code with your actual title block name.
^C^C(if (= (cdr (assoc 2 (entget (ssname (ssget "P") 0)))) "TITLE_BLOCK") (command "_eattedit")(command "_ddatte" )) - Drag and drop the custom command under the 'Attribute Block' section inside the Double Click Actions.
- Click on 'Apply' and close the CUI dialog.
That's it. Now if you double click on the title block, it will open the Enhanced Attribute Editor dialog and for all other attributed blocks, it will open Edit Attributes dialog. By the way, don't forget to take a backup of the default CUI files before you start experimenting with them.
No comments:
Post a Comment