+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
  1. #1
    Senior Member Attila The Gel's Avatar
    Computer Details
    Attila The Gel's Computer Details
    Operating System:
    Windows XP SP3
    Computer:
    Toshiba laptop
    Motherboard:
    ...
    CPU:
    ...
    RAM:
    ...
    Graphics:
    ...
    Primary Storage:
    ...
    Monitor:
    ...
    Using
    AutoCAD 2010
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    219

    Default All input and radio buttons reset when hiding a dialog to get point?

    Registered forum members do not see this ad.

    Hello,

    Is it normal that when you have a dialog with several radio buttons and edit boxes, and have a button to do a getpoint the whole dialog is reset after you click to get point?

    I know that hiding a dialog needs a "loop while", and that works properly but all input is gone whenever I want to getpoint.

    Its as if a new dialog is started.

    thx

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,041

    Default

    I'm afraid that this is the default behaviour - there is not a "true" hide of the form like in other languages. You will need to retain current user input into a temporary list and fill the dialog with those values when re-display it.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  3. #3
    Senior Member Attila The Gel's Avatar
    Computer Details
    Attila The Gel's Computer Details
    Operating System:
    Windows XP SP3
    Computer:
    Toshiba laptop
    Motherboard:
    ...
    CPU:
    ...
    RAM:
    ...
    Graphics:
    ...
    Primary Storage:
    ...
    Monitor:
    ...
    Using
    AutoCAD 2010
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    219

    Default



    Do jou mean a list of "set_tiles" or something else. cause I got 5 groups of radio buttons and its going to be troublesome this way?

  4. #4
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,041

    Default

    That true, I was saying to use the SET_TILE function to load the values previously set by you user; that it, prior to "hide" the dialog. Don't need to be afraid about effect of those setting on dialog since ACTION_TILE is triggered only on user action.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  5. #5
    Senior Member Attila The Gel's Avatar
    Computer Details
    Attila The Gel's Computer Details
    Operating System:
    Windows XP SP3
    Computer:
    Toshiba laptop
    Motherboard:
    ...
    CPU:
    ...
    RAM:
    ...
    Graphics:
    ...
    Primary Storage:
    ...
    Monitor:
    ...
    Using
    AutoCAD 2010
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    219

    Default

    Got it.

    If in dcl code "rb1" has value = 1 and I chose "rb3" in form and when it reloads after hiding, it first sets "rb1" and then "rb3" with set_tile function right.
    But its so fast you can't see it doing all that stuff?

    But how do I set_tile a radio button and a toggle?

    thx MSasu

  6. #6
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,041

    Default

    So, "rb1" is the default selection; that it, the option that appear selected when user call your command - I supposed that come from DCL definition. Next the user select the "rb3" option before "hide" the dialog to input a point on screen. When restore the dialog you just have to select from code the "rb3" option; the selection from "rb1" (that come, again, from DCL) is lost automatically - for sure, as long the said buttons are groupped in the same container.

    To select programmatically a radio-button:
    Code:
    (set_tile "rb3" "1")
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,816

    Default

    Quote Originally Posted by Attila The Gel View Post
    Do jou mean a list of "set_tiles" or something else. cause I got 5 groups of radio buttons and its going to be troublesome this way?
    MSasu is correct, you will need to store the current values of the various user input tiles and set these values when the dialog is displayed. To provide an example of how this may be accomplished, by program here has 6 buttons that will temporarily suppress the dialog whilst the user either picks an object or distance from the drawing, and the dialog must be reconfigured to the previously entered settings when displayed.
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  8. #8
    Senior Member Attila The Gel's Avatar
    Computer Details
    Attila The Gel's Computer Details
    Operating System:
    Windows XP SP3
    Computer:
    Toshiba laptop
    Motherboard:
    ...
    CPU:
    ...
    RAM:
    ...
    Graphics:
    ...
    Primary Storage:
    ...
    Monitor:
    ...
    Using
    AutoCAD 2010
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    219

    Default

    Quote Originally Posted by MSasu View Post
    So, "rb1" is the default selection; that it, the option that appear selected when user call your command - I supposed that come from DCL definition. Next the user select the "rb3" option before "hide" the dialog to input a point on screen. When restore the dialog you just have to select from code the "rb3" option; the selection from "rb1" (that come, again, from DCL) is lost automatically - for sure, as long the said buttons are groupped in the same container.

    To select programmatically a radio-button:
    Code:
    (set_tile "rb3" "1")
    I was very close I forgot the double quotes thx again MSusu I think I can go forward for now.

    Quote Originally Posted by Lee Mac View Post
    MSasu is correct, you will need to store the current values of the various user input tiles and set these values when the dialog is displayed. To provide an example of how this may be accomplished, by program here has 6 buttons that will temporarily suppress the dialog whilst the user either picks an object or distance from the drawing, and the dialog must be reconfigured to the previously entered settings when displayed.
    thx Lee MAC for the examples and for verifying what MSusu said!

  9. #9
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    3,041

    Default

    Quote Originally Posted by Attila The Gel View Post
    I was very close I forgot the double quotes
    Please keep in mind that all functions that deal with DCL accept only strings as arguments.
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  10. #10
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,816

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by MSasu View Post
    Please keep in mind that all functions that deal with DCL accept only strings as arguments.
    Except mode_tile
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

Similar Threads

  1. Replies: 0
    Last Post: 4th Feb 2011, 11:00 am
  2. DCL, Radio Buttons question
    By harrison-matt in forum AutoLISP, Visual LISP & DCL
    Replies: 10
    Last Post: 6th Nov 2010, 03:18 pm
  3. DCL Radio Buttons
    By woodman78 in forum AutoLISP, Visual LISP & DCL
    Replies: 58
    Last Post: 6th Apr 2010, 07:36 pm
  4. radio buttons
    By woodman78 in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 17th Jul 2009, 10:55 am
  5. How to pull info from a list box and radio buttons
    By nate201 in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 1st Nov 2008, 09:38 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts