Thanks
WendyJo
WNic...@Cummins-Barnard.com
The first writes the WBLOCK to a specified directory (change the
C:\\XXXX\\wblock\\ to suit your setup - make sure the directory
exists)
Type "w" at the command prompt.
(defun c:w (/ #wb# w_b1 w_f1 w_f #wip# #wso# w_ans )
(setq #wb# (getstring "\nBlock Name: "))
(setq w_b1 (strcase (strcat "c:\\XXXX\\wblock\\" #wb#)))
(setq w_f1 (findfile (strcat w_b1 ".dwg")))
(if (/= nil w_f1)
(setq w_f (substr w_f1 1 (strlen w_b1)))
)
(initget "Yes No")
(if (= w_f w_b1) (setq w_ans (getkword "\nFile exists. Overwrite
(No/<Yes>): "))
(progn (setq #wip# (getpoint "\nInsertion Point: "))
(setq #wso# (ssget))
(command "wblock" w_b1 "" #wip# #wso# "")
)
)
(if (= "Yes" w_ans)
(progn (setq #wip# (getpoint "\nInsertion Point: "))
(setq #wso# (ssget))
(command "wblock" w_b1 "Y" "" #wip# #wso# "")
)
)
)
This lisp inserts the WBLOCK written into your XXXX/wblock directory.
Type "in" at the command promt.
(defun c:in (/ #bn# bn1)
(setq #bn# (getstring "\nBlock name to insert: "))
(setq bn1 (strcat "c:/XXXX/wblock/" #bn#))
(command "insert" bn1)
)
>.... If I could make C:\Program Files\AutoCAD R14
>the default, I would not have this problem with unneeded blocks all over the
>server hard drive.
If you did you'd have an equally messy situation. Never ....*NEVER*
put drawings in the Acad home directory. Chances are if the blocks are
being created during work on a project, they are project specific and
I, in the position of CAD manager, would prefer that they be in the
project directory than cached away on someone's local machine. There's
a reason why the techician wrote the data out to a file. She probably
forsees a need to use it later in the project. Why not let others
benefit therefrom. If there's no logic to the task, then you need to
further educate your users on why and how to use the wblock command.