Autocad.net: DoubleClick

Source: Internet
Author: User
Tags polyline

 

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.

*/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.