Check CorelDRAW assembly version for .NET macro?

Right now my .NET macro is built for 17.6.0.1021, I found that if I load it into earlier version of CorelDRAW X7 it would outright crash the whole program.

Is there a way to check CorelDRAW DLL Assembly version so that it would prompt user to update their CorelDRAW? I'm thinking that I should do this within VBA before calling the DLL, but I haven't found out how.

Parents
  • Former Member
    0 Former Member over 6 years ago

    In C# Addon you can modify the Constructor in Main entry

      public partial class DockerUI : UserControl
        {
            private Corel.Interop.VGCore.Application corelApp;
            public DockerUI(dynamic app) //use reflection for support any corel version
            {
                InitializeComponent();
                if (!versionOk(app.Version))
                {
                    //Show a friendly message
                    return;
                }
                this.corelApp = app as Corel.Interop.VGCore.Application;//cast for correct type, reflection will showdown your app 
                
            }
            protected bool versionOk(string version)
            {
                //Make your check
                return false;
            }
         }
    
Reply Children