Hornet.
Some time ago I had to make up some pages of standard blocks and made up some lists of which blocks were to be on what sheets. The lists allow you to make sure the blocks are relevant to your table without going through all the odd stuff like dimticks etc.
The program then just feeds the list to the operator in the order of the list. If there are parts of this that are needlessly complicated just rip them out, or set them constant.
The error code is to close the opened file in case of crash.
(defun BINS_err (st) ; If an error (such as CTRL-C) occurs
; while this command is active...
(if (/= st "Function cancelled")
(princ (strcat "\nError: " st))
)
(if (= (type FLN) 'FILE)
(close FLN)
)
(setq FLN nil)
(setq *error* olderr) ; Restore old *error* handler
(princ)
)
(DEFUN C:BINS (/ FLN olderr SC RO B FLN FLX)
;(setq olderr *error* *error* BINS_err)
(SETQ flx (princ(getfiled "block list?" "c:\\bob\\" "dir" 8))
fln(open (findfile flx) "r")
B (princ(READ-LINE FLN))
)
(WHILE b (if (tblsearch "block" b)(princ b)
(PROGN (SETQ B (STRCAT "C:/BLOCKS/" B))
(IF (wcmatch (GETSTRING (STRCAT "\n" b)) "Y,y")
(PROGN (command "insert" b )
(SETQ SC (GETREAL "\nSCALE ?\t")
SC (IF SC SC 1)
RO (GETORIENT "\nROTATION ?\t")
RO (IF RO RO 0)
)
(COMMAND "S" SC "R" RO PAUSE)
))
) )
(setq B (princ(READ-LINE FLN)))
); WHILE
(CLOSE FLN) (setq *error* olderr)(terpri)
); Defun
It was then I wrote the originals of the post above to put the name and scale of the block next to each.
I suppose someone here could do a fancy rev2k4+ table and everything but that is my Q&D done for r12dos.
PS Thomas & Cab thanks for the note!