(setq bb (ssget "X" (list (cons 2 bbb))))
We use quote function or symbol ' to shorten writing where parts of the code are not changed, but at places where variable is used we must use list command
(setq ss (ssget "X"
(list
'(0 . "INSERT") ;this will not change
'(62 . 1) ; we look for inserts with red color so this is constant to
(cons 2 bbb) ; but this changes depending on variable
)
))
Look at this link for further explanation by Lee Mac
Miljenko Hatlak

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.