Hey All,
I can't seem to find the error of my ways in this code. Can anyone take a peek and tell me what's wrong?
Thanks
Code:
(defun c:BlockReplace (old new / ss)
(vl-load-com)
(command "-insert" "X:\\CONTROLLED_DOCUMENTS\\SYSTEMS\\ENGINEERING_DOCUMENTS\\AUTOCAD_STANDARDS\\blocks\\Balloon_Tag.dwg" ^C)
(setq old ("Balloon_T,Balloon_TL,Balloon_TR,Balloon_L,Balloon_R,Balloon_B,Balloon_BL,Balloon_BR"))
(if
(and
(setq ss (ssget "_X" (list
'(0 . "INSERT")
'(8 . "TAGS")
(cons 2 old)
'(66 . 1)
'(410 . "Model")
)
)); there are some
(tblsearch "Balloon_Tag" new); the Block is defined
); and
(foreach ; then
x
(mapcar 'cadr (ssnamex ss))
(vla-put-name (vlax-ename->vla-object x) new)
); foreach
); if
(princ)
); defun