AnsweredAssumed Answered

Indirect PIACEPoint References & Debugging ACE Code in Visual Studio

Question asked by vwitzel on Nov 30, 2017
Latest reply on Dec 4, 2017 by rdavin



I have a few questions related to ACE:


  1. I am trying to write a For loop in VB.NET to perform some basic operations using input PI tags. Specifically, I would like to use the loop counter to change the PI tag used for each loop iteration. As a simplistic example, I want the value of Tag1 used for the first loop iteration and the value of Tag2 used for the second loop iteration. What is the best way to accomplish this? If I try to use string concatenation (e.g., "Tag" & i & ".Value", where i is the loop counter) the compiler thinks it's a string and won't actually access the value of the tag. Casting the string as a PIACEPoint doesn't seem possible or desirable since the PIACEPoint is already declared as a variable through the use of the wizard. One workaround would of course be to store the values of the tags in variables or an array and then reference those variables/that array in the For loop, but I figure there must be a better way.
  2. When I make a change to my VB.NET code in Visual Studio and go to Tools > PI ACE Wizard > Debug, I get an error message stating, "The source file is different from when the module was built. Would you like the debugger to use it anyway?" The only way to avoid this from happening is to Build / Rebuild the code to both the Debug and Release folders using Visual Studio's Debug > Build/Rebuild functions. I don't recall having to do this in past, but can't figure out how to avoid it. Thoughts?
  3. Typically, when troubleshooting VB.NET code, I like to use Debug.Print to print intermediate values to the intermediate window in Visual Studio. It appears that this does not work with ACE code. Is there any other way to print intermediate windows to a local log (i.e., not the PI message log)?