RemoveModel(ModelKey: Integer): Boolean;
RemoveModel(ModelKey: uinteger): boolean;
ModelKey. Internal model key.
The RemoveModel method deletes the selected internal model.
If the model is deleted successfully, the method returns True.
The example is the procedure removing the internal model. Input parameters of the procedure:
MetaVisual. Parameters of visual building of the metamodel, containing the internal model.
Model. Internal model.
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.
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: