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 !!!
Solved! Go to Solution.
Solved by komondormrex. Go to Solution.
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))
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 ?
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))
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.