I would like to rename my ACE Class Module so it better represents its purpose. Can this be done, and if so, how?
It can be done - but it is a bit fiddly and you have to change a few things under the %OSI branch in the module database. It also depends a little bit on whether you do the code development on a different box than the ACE scheduler (which I do). I'm assuming that you mean a 2.x calculation and not a 1.x calculation.
Beneath the %OSI module is a module called ACEClassLibraries and beneath that are modules for the various assemblies. You should be able the find the assembly name of your calculation. Underneath that are are modules for each of the calculation classes. Various properties underneath these modules help the scheduler find the assembly at run time.
My process for this would be as follows (OSIsoft people look away now ). This assumes all the calculation information (eg inputs/outputs etc) remain the same.
0) Make sure you have a backup !!
1) First of all stop the ACE calculations you want to change. Stop the contexts first, then take the calculations out of service then the Executable.
2) Delete the contexts associated with the calculations you want to change.
3) If you're changing the assembly name, then do the following:
a) change the name of the assembly module to the new name.
b) In the "AssemblyPath" property under the assembly module - change the path to the assembly the reflect the new name.
c) If you do the development on the ACE node then change the "FileName" property to the new project file (the Wizard uses this)
4) Change the class module name to be under the assembly module to be the name of your new class name.
5) Deploy the new dll to the place in 3b)
6) Restart the Executable and Calculation (monitor PI Message log on the ACE node for any errors)
7) Recreate all the contexts.
I've used the above to deploy new ACE calculations from a development environment to a production environment and I'm pretty familiar (from past experience) with the way in which the Module Database is used by ACE.
Like I said, it's a bit fiddly and prone to errors. So if you're not confident - don't do it. As Eugene Lee says it's probably easier, quicker and safer to create a new calculation and copy your code into it.
From previous experiences with the ACE developers, renaming a calculation is not recommended. As of now, our recommendation is to create a NEW calculation with the desired name change. There is an internal work item 2493OSI8 on this to make this process easier.
Ian Gore, I"m looking away! I Yeah, there definitely are methods to do this by looking at the guts of the MDB ACE internal structure. Steve, now that the secret it out there, I would recommend obtaining a backup of the MDB first if you attempt what Ian provided. It might just be easier to do what Eugene suggested.
Thanks to all of you for responding! I had reluctantly taken Ian's approach in the past, but it felt hackish to be manually messing with %OSI. I have my answer that there really isn't a way to rename other than the unofficial manual hack approach. Thought maybe I was overlooking an obscure Rename button
Retrieving data ...