Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
Welcome to the Autodesk Discussion Groups, makepeace1
Try
(if (findfile "c:/your/directory/path")
(do something);; if true
(go to next command);; if not
)
HTH
Henrique
Just thougth i would put this inacse somone else was trying to do this but this is how i got it to add the support paths if the file did exist
(vl-load-com)(setq *files* (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))))
(if (findfile "\\Program Files\\folder1\\Acad")
(vla-put-SupportPath *files* (strcat (vla-get-SupportPath *files*)
";"
"\\Program Files\\folder1\\acad;"
"\\Program Files\\folder2\\acad;"
(princ "not there");; if not
That's a great idea to autoload that routine. I've get several individuals who are on laptops. All our standards are located on our server, and if the take the laptops home, a lot of customizations get blitzed because they don't connect to the VPN first. Could you supply your routine? I would like to modify what you have to check file dates and copy newer files from the server to a local folder on their their drives when they load autocad.
@Anonymous wrote:..this is how i got it to add the support paths if the file did exist
You may find these functions of interest in this respect: Support File Search Path Functions
Lee
This is what i did to get it working for me
(vl-load-com)(setq *files* (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))))
(if (findfile "\\Program Files\\folder1\\Acad")
(vla-put-SupportPath *files* (strcat (vla-get-SupportPath *files*)
";"
"\\Program Files\\folder1\\acad;"
"\\Program Files\\folder2\\acad;"
(princ "not there");; if not
(vl-load-com)(setq *files* (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))))
(if (findfile "\\Program Files\\diffrentfolder1\\Acad")
(vla-put-SupportPath *files* (strcat (vla-get-SupportPath *files*)
";"
"\\Program Files\\diffrentfolder1\\acad;"
"\\Program Files\\diffrentfolder2\\acad;"
(princ "not there");; if not
Also did the same with the enterprise load
(vl-load-com)(setq *files* (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
(if (findfile "\\Program Files\\Afolder\\Acad")
(vla-put-EnterpriseMenuFile *files* "\\Program Files\\AFOLDER\\Acad\\CUIXFILE")
(princ "not there");; if not
)