stepalibre
Alibre Super User
This still apply, you use it to know what version you are running. You then decide what to do. Where you call it is different in your app but the idea is the same.I'm working on a separate application that interfaces with Alibre using AlibreX.dll. Not sure if that's technically an add-on or not.
I can't use AlibreRoot.Version because I don't know where Alibre's copy of AlibreX.dll is. If I use my own copy, it returns the wrong value.
Maybe I should ask the user to specify the install location of Alibre, then I can run RegisterCOMdlls.BAT and load AlibreX.dll from there?
If you are working with an Add-on you can do something like:
C#:public static void AddOnLoad(IntPtr hwnd, IAutomationHook pAutomationHook, IntPtr unused) { AlibreRoot = (IADRoot) pAutomationHook.Root; _parentWinHandle = hwnd; var version = AlibreRoot.Version.Replace("PRODUCTVERSION ", ""); var versionarr = version.Split(','); var majorVersion = int.Parse(versionarr[0]); if (majorVersion < 27) MessageBox.Show(Globals.AppName + "requires a newer version of Alibre Design", "Error"); .... }