Check to make sure you still have the "X" after the ssget call, or make sure the last answer to the "block" command is still a double quote (""). Or, if you can, just post your "master" code and we'll go from there.
Code:
(defun c:scalebar ()
(setq sel1 (ssget "X" '((8 . "G-TTLB-PLBK"))))
(cond
((= (tblsearch "BLOCK" "SCALEBAR") nil)
(command "-block" "SCALEBAR" "0,0" sel1 "")
(command "-insert" "SCALEBAR" "0,0" "" "" "0")
)
((and (/= (tblsearch "BLOCK" "SCALEBAR") nil) (= (ssget "X" '((0 . "INSERT") (2 . "SCALEBAR"))) nil))
(command "-insert" "SCALEBAR" "0,0" "" "" "0")
)
)
)
Ty