Hi everyone,
at my new workplace I'm supposed to use a vast company-specific block library.
For some reason the block were saved (back in 1999) without name, only numbers.
So I have to literally go through all the blocks to find oout what is what.
I don't know much about LISP but enough to know that there is a way to have autocad do this;
This way i get a preview.
Much obliged
Manu
Try a Search. I put "Drawing Preview" in the Search window and got a lot of hits, some of which look like pretty much the same question [though I didn't dig into all of them].
Have you considered using the DWG Convert function in TrueView?
Ok, I see that you've already recieved an example, but since I told you that I was doing it, here goes another approach.
(DEFUN C:POB (/ DIR DIRF) (SETQ DIR "C:/DWG/FILES/DIRECTORY/" DIRF (VL-DIRECTORY-FILES DIR "*.DWG" 1) ) (FOREACH IDX DIRF (IF (VLA-ACTIVATE (VLA-OPEN (VLA-GET-DOCUMENTS (VLAX-GET-ACAD-OBJECT)) (STRCAT DIR IDX) :VLAX-FALSE)) (AND (VL-CMDF "-PURGE" "A" "*" "N") (VL-CMDF "ZOOM" "E" PAUSE) ) ) ) )
I understand why you got all the suggestions for scripts, but my version will simply pause for you to save or close the current active drawing.
Hi,
Just copy your drawings to C:\THUMB
load this lisp and type UTB for running!
;; drawing purger for thumbnail update purpose ;; By Abbas Aqdam (defun C:UTB ( / path files dwg sf ) (if (or (= (getvar "SDI") 0) (> (getvar "DBMOD") 0)) (alert "Please: \n\n1-SAVE and close all open drawing!\n\n2-Set SDI to 0") (progn (setq path "C:\\THUMB\\") (setq files (vl-directory-files path "*.dwg" 1)) (if (> (length files) 0) (progn (setq sf (open (strcat path "T.SCR") "w")) (write-line "Filedia" sf) (write-line "0" sf) (foreach dwg files (write-line "open" sf) (write-line (strcat "\"" path dwg "\"") sf) (write-line "(command \"purge\" \"a\" \"*\" \"N\")" sf) (write-line "(command \"zoom\" \"e\" \"zoom\" \"s\" \"0.95x\")" sf) (write-line "qsave" sf) );foreach (write-line "Filedia" sf) (write-line "1" sf) (close sf) (command "script" (strcat path "t.scr")) );progn (Alert (strcat "There is no dwg files in " path "!")) );if );progn );if );defun
Thanks,
Abbas
Wow, there are several paths to follow here.
I'm going to try all 'till I find what works best.
Thanks a bunch guys, you're the best!