Reputation: 1389
I'm trying to open an autocad file on a shared folder but it fails with comexception saying file was not found, but file exists. Here's the code:("filePath" is the path to the file and acApp is a reference to Autocad object.)
if(File.Exists("filePath"))
{
acApp.Documents.Open("filePath");
}
Upvotes: 1
Views: 278
Reputation: 186
Use \\
instead of \
Use filePath = "\\servername\\sharedfolder\\protectedfolder\\file1.dwg"
or
use full path "D:\\servername\\sharedfolder\\protectedfolder\\file1.dwg"
Upvotes: 0
Reputation: 13329
Try to replace the path with your shared drive with the UNC version.
Upvotes: 1