First of all, I would like to thank you very much for your help.
I tested your code and indeed it does not work with the dynamic block.
I need a lisp that selects both dynamic and normal blocks, by previewing the selection and adding them in a desired list.
Consider the name of blocks as the effectivename.
I really appreciate your effort.