AddWithTemplate Method (PIModules collection)

             

Creates and adds a PIModule to the collection based on the passed PIModuleTemplate, to the PIModules collection.

 

        Not Implemented

  

Syntax

object.AddWithTemplate Name, Template, [EffectiveDate]

The AddWIthTemplate method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIModules object.

Name

Name of module.

Template

PIModule template used to create module.

EffectiveDate

An optional VARIANT representing the effective date of the module added. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation. If not specified the effective date is set to 1-Jan-1970. 

 

Remarks

This call is identical to the PIModules.Add except the passed template is used to initialize the newly created PIModule properties.

Adding a PIModule to a PIModules collection with a template doesn't change the revision information of the parent PIModule.

 

This PI-SDK version does not support PIModuleTemplates; therefore this call is not supported and will return E_NOTIMPL.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseNOGENSERVER

The parent underlying generic server object could not be retrieved.

 

Enabling Operational Intelligence