I tried to migrate an small 2012 OMF sample for AutoCAD Architecture 2013. This is an ADN sample called “Entity Anchor” which sets an anchor between two entities so that one entity moves, the other follows it. There would be a variety of ways to migrate projects but I was able to migrate this sample following steps.
1. Open the 2012 project in Visual Studio 2010 to convert the project
2. Update the include file path for OMF 2013 and ObjectARX 2013 SDK
3. Update the library file path for OMF 2013 and ObjectARX 2013 SDK
4. Update preprocessor symbols. I looked at Sprinkler sample and did the same thing by adding “WINVER=0x0501;_WIN32_WINNT=0x0501;” to specify the minimum OS is Windows XP.
5. Update the additional dependency files. I also looked at Sprinkler sample and did the same thing by setting “acad.lib;adui19.lib;acui19.lib;acge19.lib;
axdb.lib;rxapi.lib;acdb19.lib;acgiapi.lib;
AecBase.lib;AecBaseEx.lib;AecArchBase.lib;
AecModeler.lib;AecResMgr.lib;AecGuiBase.lib;
AecSystemTools.lib;AecResUi.lib;Ac1st19.lib;
accore.lib;AecCore.lib;AecApp.lib;%(AdditionalDependencies)”
6. Replace stdafx.h with stdafx.h in OmfUiSprinkler folder in Sprinkler sample. This is an easy way to get the OMF, ObjectARX, and platform headers for 2013.
7. AecUiBase is replaced with AecCore class. I needed to resolve compile errors for this change. Please look at the migration document in OMF 2013 SDK for changes in 2013 release.
8. In the resource project, I added “en-US” folder to the output path. And I changed the module name to AdcgEntityAnchorRes.dll from AdcgEntityAnchorEnu.dll. This is also required change and written in the migration document. Otherwise, ACA can not find the corresponding resource dll file.
9. Build the project
I attached the migrated project Entity Anchor for your reference. Please draw two walls and run “CreateAnchor” command to anchor a wall and reference another one.