button routine

ffejgreb

Usenet Archive
Joined
Jun 30, 2003
Messages
93
Reaction score
0
I know I've seen this type of thing asked before, but I can't find it. What I would like to do is this (in a toolbar button):

Check to see if an xref is loaded, if not, load it, if so, reload it.

Any help would be, well, helpful.

Thanks much in advance,

Jeff
 
Here's a jump start.-Example

(defun c:titleblock (/ blk name)

(setq blk (ssget "x" '((0 . "insert")(2 . "*XBD*"))))

(if blk
(setq name (ssname blk 0)
name (entget name)
name (cdr (assoc 2 name))
name (tblsearch "block" name)
name (cdr (assoc 70 name))
)
)

(if (= name 36)
(command "xref" "u" "*xbd*")
)
(if (= name 4)
(command "xref" "r" "*xbd*")
)
(princ)
)
 

Latest threads

Back
Top