Forum Discussion
Former_Member
9 years agoIdeator I
Yoann thank you for the reply, but I seem to be experiencing different behavior than what you stated. The debug information shown above is from a client application using the IOM.dll
if (!Directory.Exists(fileDir))
{
log.Warn(string.Format("Drawing directory: {0} doesn't exist", fileDir));
continue;
//throw new Exception(string.Format("Drawing directory: {0} doesn't exist", fileDir));
}
string[] drawingFiles = Directory.GetFiles(fileDir, drawingNumber + "*.dwg", SearchOption.TopDirectoryOnly);
bool isNew = true;
foreach (var cadfile in drawingFiles)
{
// create our cad document object and set some properties
//
Item cadDocument = _innovator.newItem("CAD", "add");
string filename = System.IO.Path.GetFileNameWithoutExtension(cadfile);
cadDocument.attachPhysicalFile(cadfile);
The attachPhysicalFile call throws the exception listed in the original post. It's the validation routine at the server that fails, I thought the attachPhysicalFile would stream the file to the server from the client, but it doesn't appear to be that way.