.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

COM Exception when remotely opening document

0 REPLIES 0
Reply
Message 1 of 1
chrnit
154 Views, 0 Replies

COM Exception when remotely opening document

Hi.
I've got another problem with Remoting/AutoCAD/.NET.
There's a AutoCAD-Plugin "AutoCADServer".
AutoCADServer links to AutoCADWorker.dll which contains a class with the same name.
AutoCADWorker exposes some functionality like opening a file and reporting window size (for test purposes only).

Now - there's another application, named Client1 (very creative, isn't it?).
Client1 links to AutoCADWorker.dll, too.
Client1 connects to the AutoCADServer-Plugin using .NET Remoting over a TCP-Channel.
Calling the method "MWSize()" in AutoCADWorker works just fine. (Method implementation shown below)
Issuing a call to OpenDWG in Worker results in the following exception:
"System.Runtime.InteropServices.COMException (0x8000FFFF): Interner Anwendungsfehler."
This exception is thrown by "Autodesk.AutoCAD.ApplicationServices.DocumentCollection.Open(String fileName, Boolean forReadOnly, String password)".


Implementation of methods AutoCADWorker.MWSize() and AutoCADWorker.OpenDWG(string fileName):

public Size MWSize()
{
return Application.MainWindow.Size;
}

public void OpenDWG(string fileName)
{
// colLogs is a StringCollection used to trace program execution
colLogs.Add("OpenDWG: " + fileName);
document = Application.DocumentManager.Open(fileName, true);
colLogs.Add("OpenDWG: opened");
document.Editor.WriteMessage("OpenDWG: Opened Document\n");
}

Anyone able to help me with this?
I wouldn't be surprised if the whole remoting stuff wouldn't work at all, but this behaviour is IMHO just weird.

Best Regards
Christian Nitschkowski
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost