A quick update, today. Last week Jeremy posted a migrated version of the TransTips plug-in for AutoCAD, this time working inside Revit. Thanks to the shared use of AdWindows.dll in both products, this was actually really easy.
After this initial version, it made sense to refactor the code to have a core, shared file (not necessarily a separate DLL component – sharing source can give many benefits for smaller projects, such as this) used to build plugin DLLs for both AutoCAD and Revit.
Here’s the result: a single solution which will build TransTips DLLs for AutoCAD and Revit (including built versions of the DLLs). I won’t go into the specific details, here, although I did do as promised with regards to checking for network availability: if the app doesn’t manage to contact the Bing Translate service, it continues to work in offline mode, picking up translations from local XML files, where available. It’s also possible to specify this mode by default (with a very minor code change).
Otherwise the code itself should be reasonably straightforward. I used the “Add Existing Item –> Add Link” capability in VS 2010 to maintain a common file across both projects in the solution, which was new to me, and gave me exactly the project structure I was after.
In the next post in this series: support for Inventor (that one’s for you, Alex ;-) and additional work to share a common, WPF-based language selection UI across all the projects. At some point, beyond, I’ll also look at an editing capability for the XML data (also shared), and perhaps even some true componentization. We’ll see about that, though – in many ways I quite like the current approach of building a single DLL per-product.