AnalyticTypeDefn Class Methods

This section describes the analytic type definition class methods. The methods are discussed in alphabetical order.

Syntax

AddModel(ModelName, ModelType)

Description

Use the AddModel method to add either an analytic model or optimization model to the analytic type definition. If the model doesn't exist, this method fails.

Parameters

Field or Control

Definition

ModelName

Specify the name of an existing model.

ModelType

Specify the model type. Values are:

Value

Description

%ModelType_ACE

The model is an Analytic Calculation Engine.

%ModelType_OPT

The model is an optimization.

Returns

The new AnalyticTypeModelDefn object.

Syntax

AddRecord(RecordName)

Description

Use the AddRecord method to add a record to the analytic type definition. If the record definition doesn't exist in Application Designer, or if the record already exists in this analytic type definition, this method fails.

Parameters

Field or Control

Definition

RecordName

Specify the name of the record that you want to add.

Returns

An AnalyticTypeRecordDefn object that represents the record.

Syntax

Create()

Description

Use the Create method to create, and instantiate, a new analytic type. If the analytic type already exists, an exception is thrown.

Parameters

None.

Returns

None.

Syntax

CopyTo(NewAnalyticTypeName)

Description

Use the CopyTo method to copy the current AnalyticTypeDefn object to the AnalyticTypeDefn object with the specified name. This method fails if the analytic type specified with NewAnalyticTypeName already exists.

Parameters

Field or Control

Definition

NewAnalyticTypeName

Specify the name of the new analytic type definition that you want to create.

Returns

The new AnalyticTypeDefn object.

Syntax

Delete()

Description

Use the Delete method to delete the analytic type definition. You must use this method immediately after you create the AnalyticType object, before you instantiate it, that is, before you use either the Get or Create method.

Note: This method executes immediately, and deletes the definition from Application Designer.

Parameters

None.

Returns

None.

Syntax

DeleteModel(ModelName)

Description

Use the DeleteModel method to delete the specified model from the analytic type definition.

Note: The model is not deleted from the analytic type definition until you use the Save method.

Parameters

Field or Control

Definition

ModelName

Specify the name of a model that exists in the analytic type definition.

Returns

None.

Syntax

DeleteRecord(RecordName)

Description

Use the DeleteRecord method to delete a record from the analytic type definition.

Note: The record deleted from the analytic type definition until you use the Save method.

Parameters

Field or Control

Definition

RecordName

Specify the name of the record that you want to remove from the analytic type definition.

Returns

None.

Syntax

Get()

Description

Use the Get method to instantiate an existing analytic type definition as an AnalyticTypeDefn object. If the analytic type doesn't exist, this method throws an exception.

Parameters

None.

Returns

None.

Syntax

GetModel(ModelName)

Description

Use the GetModel method to return a reference to an AnalyticTypeModelDefn object.

This method fails if the model specified by ModelName doesn't exist.

Parameters

Field or Control

Definition

ModelName

Specify the name of the analytic type model definition that you want to access.

Returns

An AnalyticTypeModelDefn object.

Syntax

GetModelNames()

Description

Use the GetModelNames method to return an array of string containing all the model names in this analytic type definition.

Parameters

None.

Returns

An array of string.

Syntax

GetRecord(RecordName)

Description

Use the GetRecord method to return a reference to an AnalyticTypeRecordDefn object.

This method fails if the record specified by RecordName doesn't exist.

Parameters

Field or Control

Definition

RecordName

Specify the name of the record that you want to access.

Returns

An AnalyticTypeRecordDefn object.

Syntax

GetRecordNames()

Description

Use the GetRecordNames method to return an array of string containing the names of all the records associated with the analytic type definition.

Parameters

None.

Returns

An array of string.

Syntax

Rename(NewAnalyticTypeName)

Description

Use the Rename method to rename an existing analytic type definition to a new name. You must use this method immediately after you create the AnalyticType object, before you instantiate it, that is, before you use either the Get or Create method. The new name is not saved to the database until you use the Save method.

Parameters

Field or Control

Definition

NewAnalyticTypeName

Specify the new name for the analytic type definition.

Returns

None.

Syntax

Save()

Description

Use the Save method to save any changes that were made to the AnalyticTypeDefn object to the database.

Parameters

None.

Returns

None.