dcl tile attributes

Discussion in 'AutoCAD' started by Tom, Jan 23, 2004.

  1. Tom

    Tom Guest

    How does one set the non-value attribute of a dcl tile from a lisp function?
    Getting them is easy, but not a word in help about setting them. Thanks in
    advance.

    Tom
     
    Tom, Jan 23, 2004
    #1
  2. Tom

    John Uhden Guest

    Every interactive tile takes and returns values as strings. To empty a tile
    (set_tile "TileKey" "").
    Hope that's what you meant.
     
    John Uhden, Jan 24, 2004
    #2
  3. Tom

    Tom Guest

    Thanks for the message, John. Perhaps I should have been clearer. I know
    set_tile can send a value to a tile, but how about the other attributes,
    e.g. the label attribute. Specifically, how would one set the label
    attribute of an edit box from a lisp function? Set_tile would only affect
    its value attribute. There must be a compliment to Get_attr with which one
    can pass an attribute from a tile to a function. Thanks again for your
    trouble.
     
    Tom, Jan 24, 2004
    #3
  4. Tom

    ECCAD Guest

    To change a string in the dialog, ditch the 'Label', and use a 'text' tile: like so:

    : row {
    : text_25 { key = "msg1"; }
    : edit32_box { key = "edit_1"; allow_accept = true; }
    }
    In Lisp, do:
    (setq msg1 "Italian phrase 1")
    and, in dialog section, do:
    (if (/= msg1 nil)(set_tile "msg1" msg1))

    Bob
     
    ECCAD, Jan 24, 2004
    #4
  5. Tom

    John Uhden Guest

    Bob is correct. You can't change the label attribute of a tile. If you have to
    enable/disable one [of the pair of tiles], then enable/disable both so they
    appear to be connected.
     
    John Uhden, Jan 24, 2004
    #5
  6. Tom

    ECCAD Guest

    Another thing,
    If you plan to change the 'text' value, it will not change until you (unload / load) the .dcl again. Can be done easily with Lisp, but causes a noticable 'screen-flicker' during repaint.
    No other way to do it that I know of.
    Bob
     
    ECCAD, Jan 24, 2004
    #6
  7. Tom

    Kenny Guest

    Kenny, Jan 26, 2004
    #7
  8. Tom

    cwanless Guest

    There is a way to change the text of a label. It requires you to use ObjectDCL. ObjectDCL allows you to change the text of a label and allows you to do whole lot of other things, DCL just simply can't.

    www.objectdcl.com
     
    cwanless, Jan 27, 2004
    #8
  9. Tom

    ECCAD Guest

    I suppose there is a way in ObjectDCL, but NOT in straight .dcl files. Using a 'text' tile rather than 'Label' will fix the problem.
    Bob
     
    ECCAD, Jan 27, 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.