Referencing DWG controls in Web pages, interacting with drawings, and responding to mouse clicks on objects

Source: Internet
Author: User

Referencing DWG controls in Web pages, interacting with drawings, and responding to mouse clicks on objects
[Mxdraw CAD Control Document]
The complete example of the following help is in the sample\ie\iedemo.htm of the control installation directory.

  1. The main use of the function description
    A. Implementcommandeventfun
    The control's command event function, which interacts with the user, needs to be implemented within the command event function so that the control can ensure that the normal Windows message loop is processed.
    B. Implementmouseeventfun
    Control mouse Event function, you can use the JS program, in response to mouse events, detailed description as follows:
    void MouseEvent (Long lType, double DX, double DY, long lret);
    LONG LType Event Type, 1 mouse movement, 2 is the left mouse button press, 3 is the right mouse button press, 4 is the left mouse button double-click 5 is the left mouse button to release 6 is the right mouse button release 7 is the mouse button is the middle key to release 8 is the mouse button in the middle mouse button double Click 9 is the middle mouse button scrolling
    DOUBLE DX event occurs when the x-coordinate of the mouse, document coordinates
    DOUBLE DY the mouse y-coordinate when the event occurs, document coordinates
    LONG
    lret Lret returns non 0, message will not be passed down
    C. DrawLine
    Used to draw a straight line on a DWG diagram, as described in detail below:
    Parameter description
    DOUBLE dX1 The start point x coordinate of the line
    DOUBLE dY1 The start point y-coordinate of a line
    DOUBLE dX2 The end point x coordinate of the line
    DOUBLE dY2 The end point y-coordinate of a line
    D. Imxdrawselectionset::selectatpoint2
    Returns the entity object under a point coordinate, you can set the filter condition, return the object of a layer, a property of a certain type.
  2. JS Implementation code Description
    A. Referencing controls in a Web page,
    Clsid:74a777f8-7a8f-4e7c-af47-7074828086e2 is the GUID of the control.
    The control program can be made into a cab installation package, and data can be signed to facilitate automatic installation of downloads in the Web page.
    Detailed reference Example: http://www.mxdraw.com/iedemo.html
    <objectclassid= "Clsid:74a777f8-7a8f-4e7c-af47-7074828086e2" id= "Mxdrawxctrl" codebase= "http://www.mxdraw.com/ mxdrawx.cab#version=1,0,0,1 "width=100% height=90%>
    <paramname= "_version" value= "65536" >
    <paramname= "_extentx" value= "24262" >
    <paramname= "_extenty" value= "16219" >
    <paramname= "_stockprops" value= "0" >

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.