3 Replies Latest reply on Jan 2, 2017 10:43 AM by gregor

    Which path ACE Code in Visual Studio consider?

    Paurav Joshi

      Hello Folks,

       

      One very basic question:

      There are two machines: machine A  (ACE Server machine), and machine D (Development machine).

       

      Machine A and D has two drives C and E. In machine A %pihome% is in E drive, and in machine D %pihome% is in C drive.

      When I open ACE code of machine A in machine D, which path code it should open? Should it open code available in %pihome% path of machine A or machine D?

       

      Currently Visual Studio of machine D is opening code available @ path = %pihome% of machine A, which is unexpected IMO.

       

      EDIT:
      Version of PI ACE on machine A - 2010 R2 SP1

      Version of Visual Studio of machine D - 2013 Professional

       

      Thanks,

      Paurav Joshi

        • Re: Which path ACE Code in Visual Studio consider?
          gregor

          Hello Paurav,

           

          The path depends on where the ACE module is registered. PI ACE supports having multiple schedulers installed. If you have PI ACE Scheduler installed on your development machine and another one on your PI ACE Server, you may need to move the module over from your development machine to your PI ACE Server. PI ACE User Guide for Visual Basic .NET has an example titled Deploying ACE Calculations.

          To avoid confusions because of one machine having the PIHOME installed on drive C and another machine on a drive with a different drive letter assigned, %PIHOME% environment variable is used. If a PI ACE Module however is registered on a different host, the mechanism may not work because it's always assumed local.

            • Re: Which path ACE Code in Visual Studio consider?
              Paurav Joshi

              Hi Gregor,

               

              Thanks for reply.

              If you have PI ACE Scheduler installed on your development machine and another one on your PI ACE Server, you may need to move the module over from your development machine to your PI ACE Server.

              We are doing this already. Whatever developed in machine D, the code has been transferred to machine A which hosts ACE Server and on which the moduler registered.

               

              If a PI ACE Module however is registered on a different host, the mechanism may not work because it's always assumed local.

              My bad, I didn't understand much of it. Do you want to say that if ACE module is registered on other machine than that developed one, then it makes its path static not go acc. to %pihome%?

               

              Thanks,

              Paurav

                • Re: Which path ACE Code in Visual Studio consider?
                  gregor

                  Hello Paurav,

                   

                  Paurav Joshi wrote:

                   

                   

                  If a PI ACE Module however is registered on a different host, the mechanism may not work because it's always assumed local.

                  My bad, I didn't understand much of it. Do you want to say that if ACE module is registered on other machine than that developed one, then it makes its path static not go acc. to %pihome%?

                   

                  No. That's not what I intended to say but that environment variables are used to identify the PI Home folder.

                  I've just verified the Properties created by PI ACE in PI Module Database and found that AssemblyPath and FileName information is a full path including the drive letter. In this case %PIHOME% is not used. When you load a Module that was developed on machine A with PI ACE Wizard on machine D, the wizard will likely not find source code at the location referenced by FileName.

                  Is this the behavior you are experiencing?