It copies a time series database.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IMetabaseObjectCopyInfo | The object with copy parameters of the Time Series Database repository object. |
The command can be used for time series database only.
Executing the example requires that the repository contains a time series database with the FC identifier. Create a form and place a button with the Button1 identifier on the form. Connect the Metabase, Fore and Ui system assemblies.
The example is a handler of the OnClick event for Button1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
CInfo: IMetabaseObjectCopyInfo;
Begin
MB := MetabaseClass.Active;
CInfo := MB.CreateCopyInfo;
CInfo.Id := MB.GenerateId("FC_COPY");
CInfo.Name := Copy of time series database;
CInfo.WithData := True;
CInfo.Source := MB.ItemById("FC");
CInfo.Destination := MB.Root;
Target := WinApplication.Instance.GetPluginTarget("Cubes");
Context := Target.CreateExecutionContext;
Context.Data := CInfo;
Target.Execute("CopyRubricator", Context);
End Sub Button1OnClick;
Clicking the button copies the time series database with data.
See also: