I'm working on an app that needs to force a save after completing some operations and I get this error everytime I tried to SaveAs the currrent document. So I wrote this test app to find a solution and I found that even the bare minimum code caused the error.

I'm using SendStringToExecute as a work around but the AutoCAD .NET Developers Guide shows using the SaveAs method

I'm working on an app that needs to force a save after completing some operations and I get this error everytime I tried to SaveAs the currrent document. So I wrote this test app to find a solution and I found that even the bare minimum code caused the error.

I'm using SendStringToExecute as a work around but the AutoCAD .NET Developers Guide shows using the SaveAs method

Delegate

Thanks - yeah the 'dynamic' keyword works fine - I ran it and inspected acadDoc

But in C# the 'acadDoc.save' says there is types missing for the dynamic expression possibly system.core or microsoft.csharp. I've tried adding these but no success. System.Core should be built in now anyway it seems.

Delegate

Appears to be an issue with the Autocad Wizard for express edition. Maybe it changes a reference?

I started my own basic class library using framework 4 and it worked fine but get the error if trying to use it within the wizard.

So I created the DLL separately and referenced it in the Autocad Wizard project and it works fine.But if I add that same class to my Autocad Wizard project I get the acadDoc.Save(); underlined as an error.

I have double checked its all set to framework 4.0!

So sure it must be a reference or project setting I'm missing that is changed by the Autocad wizards?

*************EDIT******************

At least I will know better next time

Just had to add Microsoft.CSharp to the references lol Confused as always - Microsoft.CSharp was available within the object browser already so not sure why I needed to reference it. :ugly: