Special characters in DCL labels

Discussion in 'AutoCAD' started by Martin Shoemaker, Mar 27, 2005.

  1. I'd like to use "greater than or equal" in a radio button label. DCL
    doesn't seem to like unicode. Is there a way to use unicode in a DCL
    label? Any help would be appreciated.

    Martin
     
    Martin Shoemaker, Mar 27, 2005
    #1
  2. Bill,

    Thanks. Regular text is no problem. I have a situation where I need to
    set a temperature range, and I have very limited space in the dialog
    box. Being able to insert a "less than or equal" would make the
    selection technically correct and would fit the space available.
    Changing the screen font is not an option, and the "less than or equal"
    symbol appears to be available only as unicode, based on the Windows
    character map.

    Martin
     
    Martin Shoemaker, Mar 28, 2005
    #2
  3. Martin Shoemaker

    BillZ Guest

    Can't you just concantenate it with the rest of the string?


    (strcat (chr 60)(chr 61) "TEMP")


    Bill
     
    BillZ, Mar 28, 2005
    #3
  4. Sure. No strcat is necessary for that: (print "<= 140ºF") will do
    that. What I'm after is the single character "less than or equal",
    which is at \U+2264. It's mostly aesthetics....

    Martin
     
    Martin Shoemaker, Mar 28, 2005
    #4
  5. Martin Shoemaker

    ECCAD Guest

    (strcat "\U+2264" rest_of_txt)

    Bob
     
    ECCAD, Mar 28, 2005
    #5
  6. Martin Shoemaker

    ECCAD Guest

    Disgard that. Only works for text inserted in .dwg - not
    in 'ascii' range for 'text' in a DCL file.
    To see what I mean, do a Text in drawing, make it "AA".
    Edit the text and change to "\U+2264AA".
    Should show the <= symbol as 1st character.
    When 'text' or 'label' applied in a .DCL, the .dcl file is just
    'plain' text of range 32-128.......and doesn't know how to
    handle the unicode.
    Bob
     
    ECCAD, Mar 28, 2005
    #6
  7. Thanks, but I get an error on the label line with:

    : radio_button
    {
    key = "30deg" ;
    label = (strcat "\U+2264" "140°F");
    }

    The error report is:

    ====== DCL semantic audit of fd.dcl ======

    Warning in "fault_drop". (widget type = radio_button, key = "30deg")
    Attribute 'label' has a value of the wrong type.
    It should be a quoted STRING.


    label = "\U+2264 140°F"; labels the radio button as '\U+2264 140°F'.
    Am I missing something in the syntax?

    Martin
     
    Martin Shoemaker, Mar 28, 2005
    #7
  8. Martin Shoemaker

    ECCAD Guest

    Ya,
    Sorry bout that, read my last post.
    Bob
     
    ECCAD, Mar 28, 2005
    #8
  9. Martin Shoemaker

    BillZ Guest

    Ah,

    I see the unicode is "less than" with an underbar....


    Bill
     
    BillZ, Mar 28, 2005
    #9
  10. One way to do this would be to use an image tile. Draw the symbol, make a
    slide, then display the slide in your dialog with the same background color
    as the dialog to make the boundary and background disappear. If you make it
    small enough, it could work. It's not a very elegant solution, but it could
    work.

    Dan
     
    Daniel J. Altamura, R.A., Mar 28, 2005
    #10
  11. Martin Shoemaker

    ECCAD Guest

    You won't believe this one.
    :)
    label = "&<TEMP"

    Bob
     
    ECCAD, Mar 28, 2005
    #11
  12. Martin Shoemaker

    BillZ Guest

    You won't believe this one.
    <<<

    I believe it Bob.

    But really all you did was make the back arrow be the mneumonic character.


    Bill
     
    BillZ, Mar 28, 2005
    #12
  13. Martin Shoemaker

    ECCAD Guest

    Well...
    Just avoid using that Mneumonic

    Bob
     
    ECCAD, Mar 28, 2005
    #13
  14. Martin Shoemaker

    BillZ Guest

    Just avoid using that Mneumonic<<

    Well using the mneumonic wouldn't be the problem , esp being the it's the "label" of a radi button.

    The limitation would be that you can only do it in the dcl and not the set_tile or concantate it into a run time variable.

    But good idea for a fixed label. :)

    Bill
     
    BillZ, Mar 28, 2005
    #14
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.