below is some code a coworker of mine wrote for selecting objects on a certain and making them a block. I would like to convert it to vba and as the subject line says where do I start?
;start of Scalebar function
(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")
)
)
)
;end of scalebar function
;start of Scalebar function
(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")
)
)
)
;end of scalebar function