graying out within dcl

Discussion in 'AutoCAD' started by dflynn0001, May 28, 2004.

  1. dflynn0001

    dflynn0001 Guest

    Does anybody have a simple example of lisp code that controls a dcl file that will dynamically gray out and return to active elements based on another radio button within the same dcl file.

    i.e. On one row I have the user choose if they want an offset and on the next line what that offset distance would be, but I would like to change the code so that if they choose no offset the offset distance is grayed out and not available for them to edit. Don
     
    dflynn0001, May 28, 2004
    #1
  2. dflynn0001

    ECCAD Guest

    (mode_tile key mode)

    Arguments

    key

    A string that specifies the tile. The key argument is case-sensitive.

    mode

    An integer that can be one of the following:

    0 Enable tile

    1 Disable tile

    2 Set focus to tile

    3 Select edit box contents

    4 Flip image highlighting on or off

    Return Values

    nil
     
    ECCAD, May 28, 2004
    #2
  3. dflynn0001

    Jürg Menzi Guest

    dflynn0001

    (mode_tile "YourTile" 1) ;disable tile
    (mode_tile "YourTile" 0) ;enable tile

    Cheers
     
    Jürg Menzi, May 28, 2004
    #3
  4. dflynn0001

    ECCAD Guest

    (defun next ()
    (setq pagenum (1+ pagenum))
    (if (< pagenum pages)
    (mode_tile "next" 0)
    (mode_tile "next" 1)
    ); end if
    (mode_tile "prev" 0)
    (fill_slides dwgs (* (1- pagenum) 8))
    ); end function
    ;;
    (defun prev ()
    (setq pagenum (1- pagenum))
    (if (> pagenum 1)
    (mode_tile "prev" 0)
    (mode_tile "prev" 1)
    ); end if
    (mode_tile "next" 0)
    (fill_slides dwgs (* (1- pagenum) 8))
    ); end function

    Bob
     
    ECCAD, May 28, 2004
    #4
  5. dflynn0001

    Rudy Tovar Guest

    Save the space, why even grayout the edit_box.

    (if (> (distof $value_of_edit_box) 0)
    (progn
    (don't_offset)
    (do_what_ever)
    )
    )
    --

    AUTODESK
    Authorized Developer
    http://www.Cadentity.com
    MASi


    that will dynamically gray out and return to active elements based on
    another radio button within the same dcl file.
    next line what that offset distance would be, but I would like to change the
    code so that if they choose no offset the offset distance is grayed out and
    not available for them to edit. Don
     
    Rudy Tovar, May 28, 2004
    #5
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.