PIModule Object



A PIModule is the fundamental object used to add structure to the PI Data Archive. Some structure examples are:

PIModule objects have a property PIModules collection; this allows PIModule objects to hierarchically reference other PIModule objects.


This object supports the IRefresh interface. Only the PIModule itself and the other SDK objects (PIAliases and PIProperties collections) immediately contained in the PIModule are refreshed. The PIModule's in the PIModules collection are NOT refreshed.


This object supports the IPIPersist interface. The persistence string only contains enough information to ask the database for the object. It doesn't contain a copy of the data within the object. PIModule's can have different values that are in effect at different times. When a PIModule is persisted, the EffectiveDate of the module is persisted too. When a module is restored, the value in effect at that date is returned. If you want to retrieve a different value of a PIModule, you need to pass a QueryDate value in the context collection when calling the PIGlobalRestorer.RestoreObject method. The value at or before the QueryDate will be returned.


This object supports the IPIServers interface. It only returns the server for the PIModule itself. If you want to check for servers in the PIAliases or PIProperties collections within the PIModule, you need to get the IPIServers interface from those collections.


This object supports the IPITransaction interface. This is a simpler and more efficient way to modify a PIModule than using the ModifyAttributes method. In addition you can delete PIProperty's and PIAlias's which you can't do with ModifyAttributes. Being in transaction mode has no effect on changes to the PIModules collection of the PIModule.


This object supports the IPISecurity, IPISecurity2, PIModule2, and PIModule3 interfaces.

Enabling Operational Intelligence