Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

block routine. where do i even start?

Status
Not open for further replies.

vbcad

Technical User
Jul 12, 2002
159
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top