Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The following C# code works under AutoCAD (2013/14) and crashes under AutoCAD OEM 2013:
dynamic acadApp = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication; dynamic preferences = acadApp.Preferences; //OK in AutoCAD. Crash in AutoCAD OEM
I suppose the OEM crashes, because it doesn’t expose the AcadApplication COM interface. Am I right?
In C++ I can get the OEM’s IAcadApplication Interface when I am in an ARX that is running in acad’s / oem’s address space:
CWinApp *pApp = acedGetAcadWinApp(); IAcadApplication *pIAcad = (IAcadApplication*)pApp->GetIDispatch(TRUE);
Is there a similar way to get the AcadApplication in C# that works in CAD _and_ OEM?
--Thomas
Thomas Brammer ● Software Developer ● imos AG ● LinkedIn ●
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.
Solved! Go to Solution.