2 Replies Latest reply on Nov 5, 2015 7:22 AM by andrew_french

    Problem with automation pro license

    pedro_franca_costa

      I had a script written in C# working in the past with xpedition vx.1.

       

      "

      objExtendedPrint = new MGCPCBEngines.ExtendedPrint();

       

      objExtendedPrint.DesignFileName = "xxxx";

      objExtendedPrint.SetupFileName = "xxxx"";

      objExtendedPrint.BasicConfigurationFile = "xxxx"";

      objExtendedPrint.OutputFileName = outf;

             

      objExtendedPrint.Go();

       

      "

       

      Now when objExtendedPrint.Go(); runs it throws me an exeception and says that "No license was found for Automation Pro"

       

      Someone had this problem before. It was working, but now it just gives me this error..

       

      Thanks!

        • 1. Re: Problem with automation pro license
          pedro_franca_costa

          So i define the path in another way in C# code.

          Tried to update Xpedition with update V14 and i still have the same problem.

           

          "

                          String SddHome = System.Environment.GetEnvironmentVariable("SDD_HOME");

           

           

                          if(SddHome==null)

                          {

                          var vxEnv= new MGCPCBReleaseEnvironmentLib.MGCPCBReleaseEnvServer();

                          vxEnv.SetEnvironment();

                          String VxVersion = vxEnv.sddVersion;

           

           

                          SddHome = vxEnv.sddHome;

                          int idx = SddHome.IndexOf("SDD_HOME");

                          SddHome = SddHome.Substring(0, idx).Replace("\\", "\\\\") + "SDD_HOME";

                          vxEnv.SetEnvironment(SddHome);

           

           

           

           

                          MessageBox.Show(SddHome);

          }

          "Untitled.jpg

          • 2. Re: Problem with automation pro license
            andrew_french

            Did you do anything to configure your developer environment to get this to run properly for you?  I have no idea what I'm doing wrong and have tried using the exact same code you have here in C# to set the SDD environment.

             

            I always crash on the line

            var vxEnv= new MGCPCBReleaseEnvironmentLib.MGCPCBReleaseEnvServer();

             

            An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll