An Easy way to update Users Local files
Do you want to always ensure that your users have the same custom files available for use in AutoCAD? An easy way to do this is to create a "seed file" folder on your network and then copy the following snippet of code into their acad.lsp file. Keep the acad.lsp file on the network and point each user to it and you can keep all your users up to date. Assumption for this example: ;;; Check the following directory for standard seed files for users
(setq SeedFiles "x:\\custom\\lisp" )
Hope that was helpful.
at the following location: x:\custom\lisp
location: c:\custom\lisp
;;; If they are not resident then copy them over.
(setq RootUser "c:\\custom\\lisp")
;;;Use the foreach to cycle through each file found and check for a local copy
;;;If not found then copy it over and report...
(foreach n
(vl-directory-files SeedFiles nil 1)
(if (/=
(vl-file-systime (strcat RootUser "\\" n)
)
nil)
(princ)
(progn (vl-file-copy
(strcat SeedFiles "\\" n)
(strcat RootUser "\\" n)
) ;copy file
(prompt
(strcat "\nCopying " n " to User Personal folder on " RootUser)
)
);end progn file copy
);end for each
);end macro
(princ)








Links to this post:
Create a Link
<< Home