Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cutting down on the clicks

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Bernard.WattsPRTKU
196 Views, 1 Reply

cutting down on the clicks

Given: A simple dialog box with one List and Cancel button.  The attribute multiple_select = "false"

Can the pick item from the list tile also be the automatic, OK?  

I thought I read somewhere that it can be done but the syntax eludes me.

BernardWattsPRTKU_0-1711110560057.png

DCL_settings : default_dcl_settings { audit_level = 3; }
tryforautoOK : dialog { label = "List of stuff toggle";
: list_box { label = "stuff list:";
     key = "stufflst";
     multiple_select = false;
     width = 32;
     height = 10;   }/* list_box */
: button {
        label           = "Cancel";
        key             = "cancel";
        alignment       = centered;
        fixed_width     = true;
        is_cancel       = true;  }
}
 
*.lsp bit:
...
(new_dialog "list_select" (setq d (load_dialog fn)))
(start_list "stufflst")
(mapcar add_list stufflst)
(end_list)
(setq item (set_tile "stufflst" "0"))
(action_tile "stufflst" "(setq usrpik $value)")
(start_dialog)
(unload_dialog)
...

 

Thank you.

B, Watts

1 REPLY 1
Message 2 of 2

$reason = 4 -> double-click with done_dialog

 

(action_tile "stufflst" "(cond
							((= 4 $reason) (setq usrpik $value) (done_dialog 1))
							(t (setq usrpik $value))
					     )"
)

 

or just done_dialog

 

(action_tile "stufflst" "(setq usrpik $value) (done_dialog 1)")

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report