- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have code from the past that gets an AeccApplicationClass using:
// Note: GetInterfaceObject() has a bug in it. It uses the default Windows object marshaller,
// which can result in it returning the AeccApplication from the wrong instance of Autocad if more
// than one instance is running. This creates a problem even if the other instance is another
// Autocad product, such as Land Desktop. So instead of using GetInterfaceObject(), we instead
// use this method to get the AeccApplication.
public IAeccApplication CivilApp {
get {
if (_civilApp == null) {
_civilApp = new AeccApplicationClass();
_civilApp.Init((IAcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication);
}
return _civilApp;
}
}
I got this from one of the gurus, not taking credit for it by any means.
When I do the reference changes suggested in
http://adndevblog.typepad.com/infrastructure/2012/04/com-references-on-civil-3d-2013.html
and
http://blog.civil3dreminders.com/2012/04/upgrading-to-civil-3d-2013-programming.html
I get errors on the "new AeccApplicationClass();" line, VS 2010 says "...cannot be embedded, use applicable interface instead...".
This code might be from the free SincPac, to which i know there are several fans out there.
Any ideas what the proper way is now to make the AeccApplicationClass object?
thanks
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Solved! Go to Solution.