Double clicking on most objects in the drawing window displays the properties palette. This behavior can be changed with the doubleclickaction and doubleclickcmd classes. Use this to add behavior to custom objects as well.
To edit the double-click behavior, first attach a macroid to a doubleclickcmd object. this defines the action that will be saved med. next, attach a doubleclickaction to a Drawing Object using the dxfname () property. finally attach the action to the command.
StringAcadcui = (String)Application. Getsystemvariable ("Menuname") +". Cui";// Get maincuifile
Acadcui = acadcui. tolower ();
CustomizationsectionCS0 =New Customizationsection(Acadcui );
StringCustomcui = acadcui. Replace ("Acad. Cui","Custom. Cui");// Get partialcui
CustomizationsectionCustom =New Customizationsection(Customcui );
DoubleclickactionDblclickaction =New Doubleclickaction(Custom. menugroup,"My double click",-1 );
Dblclickaction. dxfname ="Polyline";
DoubleclickcmdDblclickcmd =New Doubleclickcmd(Dblclickaction );
Dblclickcmd. macroid ="Mm_1567";
Dblclickaction. doubleclickcmd = dblclickcmd;
/* Dblclickaction is now set to execute the polyline edit macro (mm_1567) when a polyline is double-clicked.
* If a double-click action for an object is overridden, the new action takes precedence,
* And the old action becomes inactive.
*/