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

DCL - Popup_list

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
pierre_costeS8GW8
327 Views, 5 Replies

DCL - Popup_list

Hello guys,

 

The target is to use attribute tag values from blocks to perform calculations. For that i did a routine that select block, create a list( sublist(block_name1 SWL1 MBL1 EWL1) .....). The "button" on the dialog box is supposed to display the values of the selected block in the popup_list. To extract the values inside the sublist, i use assoc to compare the block_name of the sublist an the one from the popup_list.

 

I have an issue, i am not able to display those values into the dialog box. 

I do not have the expertise to target the issue.

 

You will find attached a .lsp, .dcl and .dwg. 

 

Thank you very much for your help !!!

 

pierre_costeS8GW8_0-1690467576481.png

 

5 REPLIES 5
Message 2 of 6

hello there,

you need to replace

(setq assoc_list_ancill (assoc 'block_ancillary_selection block_att_value_anci_list))

with 

(setq assoc_list_ancill (nth (atoi block_ancillary_selection) block_att_value_anci_list))

Message 3 of 6

It is a big step, thank you ! but ....it does not associate the right block_name with the right values ... could you help me out ?

 

Message 4 of 6

in that case replace your code with this

(setq assoc_list_ancill (assoc (nth (atoi block_ancillary_selection) ancillary_blocks) block_att_value_anci_list))

Message 5 of 6

It does really work the way I expected it, thank you very much !
Message 6 of 6

you're welcome)

you also may consider to change your code for instant displaying blocks data, like this:

(defun c:TEST_DISPLAY ()

  (vl-load-com)

  (POPO)

  (setq dcl_id (load_dialog "CheatCode.dcl"))
  (if (not (new_dialog "Handle_Data" dcl_id)) (exit))

  (start_list "ObjectList")
  (mapcar 'add_list ancillary_blocks)
  (end_list)

  (Displaying)                             ;****************added
  (action_tile "ObjectList" "(Displaying)");****************added

  (action_tile "button" "(Displaying)")

  (action_tile "accept" "(done_dialog 1)")
  (action_tile "cancel" "(done_dialog 0)")
  (action_tile "help" "(help_button)")

  (start_dialog)
  (unload_dialog dcl_id)

)

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report