Hi everyone,I got the errror: already exists.(stg_e_filealreadyexists) when using the method IMapDocument.Open() as below codes:if (File.Exists (strDirectory + "\\temp.mxd")) File.Delete(strDirectory + "\\temp.mxd"); System.IO.FileStream oFileStream = new System.IO.FileStream(strDirectory + "\\temp.mxd", FileMode.Create); oFileStream.Write(MyImage, 0, MyImage.Length); IMapDocument mapDoc = new MapDocumentClass(); mapDoc.Open(strDirectory + "\\temp.mxd"); // Throw exception
Do you know why and how to fix this error ?Thanks and regards,Tai