I have the following line of code: (setq dwgFile "V:\\Marketing\\Work Samples\\Sample AutoCAD Drawings\\SAMPLE-INDEX-A.1.dwg" ) I then go: (vl-load-com) (setq acadDoc (vlax-get-property (vlax-get-acad-object) 'Documents)) (vlax-invoke-method acadDoc 'Open dwgFile)) ;;; this gives me a file not found error. If I use: (setq dwgFile (getfiled "Select dwg file containing package list" "*" "dwg" 8)) ; which makes the user manually locate the file on the network, then it will load and open properly. Obviously, I do not want to have to make the user manually look for the file...so, what am I doing wrong when I set the variable? I have tried every possibility of \ ,\\, /, // that I can think of. Thanks, Elise Moss www.mossdesigns.com
Check your path again. I just tried it using the same file name in a different path and it worked fine..... (setq dwgFile "C:\\Base Maps\\Jeffs Test Files\\junk\\SAMPLE-INDEX-A.1.dwg" ) (setq acadDoc (vlax-get-property (vlax-get-acad-object) 'Documents)) (vlax-invoke-method acadDoc 'Open dwgFile)
You can add the path to your Support File Search Path in Options;Files. Then: (setq dwgFile (findfile "SAMPLE-INDEX-A.1.dwg")) -- Bill DeShawn http://my.sterling.net~bdeshawn Drawings\\SAMPLE-INDEX-A.1.dwg" ) file...so, what am I doing wrong when I set the variable? I have tried every possibility of \ ,\\, /, // that I can think of.
Is there a way to programmatically add the path to the support files list if the file is not found? The reason I ask is that we will have mulitple users trying to locate these files and they may or may not have the paths set up in their support files options.