What I understand is the following:
- You are using PI ACE calculations based on Module context where Aliases are referring PI Points. For simplicity, let's assume you do have an Alias "Input" and another "Output".
- What PI Points Aliases are pointing to is relatively fix but may change.
- You decided for Module versioning to keep track of changes over time.
- You like to be able to reproduce what PI Point was referenced for a certain period.
- You may also schedule your ACE calculation for recalculation and like the correct PI Point being used based on the Module version that was active at that time.
If there something wrong with the above, please correct me.
Can you please explain where you do run into an issue? With the code snippet you provided, is my assumption right that Alias names "Input" and "Output" have not changed?
I am also uncertain if we would recommend using PI ACE with Module Database Versioning these days. Have you thought about alternatives e.g. using Asset Based Analytics?
I've done some testing and found what you are trying to do will likely not work or not work very well.
I've created an ACE module and set the context to "Input" and "Output" alias of an existing Module in MDB. The output was pointing to a PI point of type string and I was logging the name of the Point configured with "Input" to it.
I than created a new version of the Module in MDB and pointed "Input" to a different PI Point.
PI ACE was recognizing the change when debugging but the "running" PI ACE Module was still reporting the "old" PI Point reference until I restarted the module. I assume the information is either cached within the PIACEClassLibraryHost.exe session or even with the PI SDK connection used by PIACEClassLibraryHost.exe
This said, if I properly understand what you are trying to do here, I feel this will not be working properly.