MTCopy Method (MTNVS collection)

             

 

Copies an existing MTNV and adds that copy to the collection.

 

Syntax

object.MTCopy Source, ReplaceDuplicates

The MTCopy method syntax has these parts:

Part

Description

object

An object expression that evaluates to a MTNVS object.

Source

An object expression that evaluates to a MTNV object. This object is copied, and the copy is added to the collection.

ReplaceDuplicates

An optional Boolean expression, as described in Settings.

 

Settings

The settings for ReplaceDuplicates are:

Setting

Description

true

If the collection previously contained a MTNV with the same name as the new object, the value of the new object replaces the object’s old value. This is the default.

false

If the collection previously contained a MTNV with the same name as the new object, the old value remains unchanged and an error is reported.

 

Remarks

Returns a reference to the newly created MTNV object.

 

Trappable Errors

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

Error

Description

pseACCESSDENIED

The collection cannot be modified because it is frozen; that is, the collection's MTReadOnly flag is true.

pseDUPLICATENAME

The new object has the same name as a member of this collection, but ReplaceDuplicates is false.

Enabling Operational Intelligence