IMsMetaModelVisualController.RemoveModel

Fore Syntax

RemoveModel(ModelKey: Integer): Boolean;

Fore.NET Syntax

RemoveModel(ModelKey: uinteger): boolean;

Parameters

ModelKey. Internal model key.

Description

The RemoveModel method deletes the selected internal model.

Comments

If the model is deleted successfully, the method returns True.

Fore Example

The example is the procedure removing the internal model. Input parameters of the procedure:

Add a link to the Ms system assembly.

Sub UserProcRemove(Var MetaVisual: IMsMetaModelVisualController; Var Model: IMsModel);
Var
    i: Integer;
Begin
    //Remove the model
    MetaVisual.RemoveModel((Model As IMetabaseObject).Key);
End Sub UserProcRemove;

After execution of the procedure the specified internal model will be removed.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub UserProcRemove(Var MetaVisual: IMsMetaModelVisualController; Var Model: IMsModel);
Var
    i: Integer;
Begin
    //Remove the model
    MetaVisual.RemoveModel((Model As IMetabaseObject).Key);
End Sub UserProcRemove;

After execution of the procedure from the internal model all factors will be removed or the model itself will be removed (depending on specified parameters).

See also:

IMsMetaModelVisualController