• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    *Expert Elite*
    Posts: 6,474
    Registered: ‎06-29-2007

    Re: How to indicate position of getstring ?

    05-03-2012 12:28 PM in reply to: jeffHGCE

    Hi,

     

    >> how you will handle changing the lengths

    Just a short interrupt: have you looked into constraints?

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Contributor
    Posts: 13
    Registered: ‎05-31-2010

    Re: How to indicate position of getstring ?

    05-03-2012 11:08 PM in reply to: rebarwin

    Thank you very much for your help to all who have answered. This was important for me and now I see solutions for my problem.

     

    I am trying them and will go back to this thread to report on the results.

     

    Of the solutions that have been proposed, what seems closer is inplacetexteditor using dbtext instead of mtext, as in [CommandMethod("EnterLengthsDbtxt")] . This is because with dbtext you end edition by pressing enter, so it is simpler. With mtext you have to press Ctrl-Enter.

     

    REGARDING THE SOLUTION WITH INPLACETEXTEDITOR ( [CommandMethod("EnterLengthsDbtxt")])

    I would like a possibility of controlling the navigation keys: for instance when the user presses the up arrow key, the editing focus should go back to the previous segment.

     

    REGARDING THE SOLUTION WITH SMALL FORM

    This solution was proposed earlier and it would be great since it would also work on older autocad versions. I have 2 difficulties in implementing it:

    Problem 1) Manage the navigation keys: When the user presses enter, it should go to the form in the next segment (without needing to press ok button), when the user presses the up arrow key, the editing focus should go back to the form in previous segment.

    Problem 2) How to convert from autocad coordinates to screen coordinates needed to position the small form

     

    REGARDING THE SOLUTION WITH GETSTRING

    It seems the getstring input field appears at the cursor location, it would be enough to be able to change cursor location, but don't know if this is possible or how to do it.

     

    REGARDING THE PROPOSAL TO LOOK AT CONSTRAINTS:

    >> how you will handle changing the lengths

    >Just a short interrupt: have you looked into constraints?

    Sorry I don't know what constraints are

     

    THANKS FOR YOUR HELP, THIS IS IMPORTANT FOR ME.

    JOSE MARIA ESPINOSA

    Please use plain text.
    *Expert Elite*
    Posts: 6,474
    Registered: ‎06-29-2007

    Re: How to indicate position of getstring ?

    05-04-2012 04:30 AM in reply to: rebarwin

    Hi,

     

    for getting coordiantes:

    Within AutoCAD I think you know how to get the coords, for the screen you can use

    System.Windows.Forms.Control.MousePosition

    to know where you mouse is placed on your screen and so where you have to popup your form-object.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.