The New method creates a new object for a collection with a specified name.
[Set object =] Collection.New( Name )
| Part | Description |
|---|---|
| Collection | Expression that evaluates to an object in the Applies To list |
| object | Object variable to receive reference to created object |
| Name | String that is to be the name of the created object |
The required type of object depends on the collection to which it is being added:
| Collection | Object |
|---|---|
| GlobalVariables | GlobalVariable Object |
| Lookups | Lookup Object |
| PrecedenceConstraints | PrecedenceConstraint Object |
| TransformationSets | TransformationSet Object |
The New method for the collections in the Applies To list creates a new object with the specified name. The New methods for other collections use different parameters and syntax.
HRESULT New(
BSTR Name,
ObjectInterface **RetVal);
This sample statement creates a new TransformationSet object named Customers, in Microsoft® Visual Basic®:
Set objTransSet = objParPumpTask.TransformationSets.New( "Customers" )