Beginner Question - Setting default for action_tile button

Discussion in 'AutoCAD' started by Edgetrimmer, Jan 9, 2004.

  1. Edgetrimmer

    Edgetrimmer Guest

    I have a nice a routine by M. Jenkins called ddlist.lsp (and ddlist.dcl)
    which was published in a CAD magazine some years back that will let you pick
    a nested object and show all it's properties in a dialogue box output. It's
    similar to Express Tools xlist command but it can go deeper finding nesting
    properties. My problem is there is an action_tile that is either checked or
    unchecked to determine if nested objects are picked and it starts out
    unchecked when the command is first run. Well, I almost always want the box
    checked, so I was hoping to change the code or the action_tile definition
    somehow to have the button checked by default and let me uncheck it on the
    rare occasions I wish to list properties of unnested objects. Any dialogue
    box programmers out there who would be willing to help?

    Thanks in advance,
    Edgetrimmer
     
    Edgetrimmer, Jan 9, 2004
    #1
  2. Edgetrimmer

    BillZ Guest

    If it is a toggle, it has a value of either 1 or 0.
    This may be set at the start of the lisp program but may be is set in the DCL file.

    Value = "1" ;

    Add this to the appropriate tile and it should appear as "X"ed.

    If not:
    Look for (set_tile "key" "0") in the lisp in case that's where they do it and set it to "1".

    Bill
     
    BillZ, Jan 9, 2004
    #2
  3. Edgetrimmer

    rdi Guest

    I assume that when you say "action Tile", you mean toggle--right?

    If so, in the DCL file, the tile will have a "Key"--this is the NAME of the
    tile.

    Let's say that the KEY is Tog1.

    In the LSP file:
    Do a search for "new_dialog" and right after this call place the following.

    (set_tile "Tog1" 1); Check the toggle
    (set_tile "Tog1" 0); Uncheck the toggle
     
    rdi, Jan 9, 2004
    #3
  4. Edgetrimmer

    Edgetrimmer Guest

    Thank you for your reply. I will have to look at the logic of the lisp
    routine to see how to reverse the default of the button.

    Regards,
    Edgetrimmer
     
    Edgetrimmer, Jan 10, 2004
    #4
  5. Edgetrimmer

    John Uhden Guest

    Right above (as in "before") the following...
    (if (= #ddlist_n "1")
    (while (not (setq ENT (nentsel)))
    (prompt "\nNo entity selected.")
    )
    (while (not (setq ENT (entsel)))
    (prompt "\nNo entity selected.")
    )
    )
    Add the following line...
    (or #ddlist_n (setq #ddlist_n "1"))
     
    John Uhden, Jan 11, 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.