Returning a number from an edit_box in DCL

Discussion in 'AutoCAD' started by Rick Keller, Sep 27, 2004.

  1. Rick Keller

    Rick Keller Guest

    Hello,

    Is there a way to return a numeric value from an edit_box in DCL?

    Specifically if a person types in 2'-6" or 30 or 2'6 etc..

    Have it return 30 like getdist does.

    Or how do I convert it?


    Rick
     
    Rick Keller, Sep 27, 2004
    #1
  2. The edit box returns a string value.
    You would have to convert it to the appropriate value required.
     
    Alan Henderson @ A'cad Solutions, Sep 27, 2004
    #2
  3. further to Alan's note, use

    (distof var)

    var being the string value such as "135'2" etc...
     
    Casey Roberts, Sep 27, 2004
    #3
  4. Rick Keller

    Rick Keller Guest

    Ok, I'll give it a try.

    Thanks
    Rick
    further to Alan's note, use

    (distof var)

    var being the string value such as "135'2" etc...
     
    Rick Keller, Sep 28, 2004
    #4
  5. Rick Keller

    Rudy Tovar Guest

    Just remember that your units must be set prior to actually attempting this, and dimzin.

    Ok, I'll give it a try.

    Thanks
    Rick
    further to Alan's note, use

    (distof var)

    var being the string value such as "135'2" etc...
     
    Rudy Tovar, Sep 28, 2004
    #5
  6. Rick Keller

    Rick Keller Guest

    I've got that figured out thanks to distof.

    But now I am trying to set a default value for a pair of radio buttons.

    When the dialog comes up the settings are correct but it isn't returning the default value if you dont select it.

    If you select either one it works fine.

    I have included an example.

    Rick



    Just remember that your units must be set prior to actually attempting this, and dimzin.

    Ok, I'll give it a try.

    Thanks
    Rick
    further to Alan's note, use

    (distof var)

    var being the string value such as "135'2" etc...
     
    Rick Keller, Sep 28, 2004
    #6
  7. Rick Keller

    BillZ Guest

    You need to set your variable with the default value when you display the dialog for that reason.

    Bill
     
    BillZ, Sep 28, 2004
    #7
  8. Rick Keller

    Rick Keller Guest

    I get it... set the varivle ahead of time & let the dialog change it (or
    not).
    Thanks
    Rick
     
    Rick Keller, Sep 28, 2004
    #8
  9. Rick Keller

    BillZ Guest

    You're welcome.


    Bill
     
    BillZ, Sep 29, 2004
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.