CreateCustomClass

Purpose

Opening a dialog box for creating a new custom class.

Parameters of Use

None

Application Features

If a new custom class is successfully created, the Execute method returns the key of the new class, otherwise it returns -1.

Example

To execute the example, add links to the Metabase and Ui system assemblies.

Sub UserProc;
Var
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Result: Integer;
Begin
    Target := WinApplication.Instance.GetPluginTarget(
"Std");
    Context := Target.CreateExecutionContext;
    Context.Data := MetabaseClass.Active;
    Result := Target.Execute(
"CreateCustomClass", Context);
    Debug.WriteLine(Result);
End Sub UserProc;

After executing the example a dialog box opens for creating a custom class. Set class parameters and click the OK button. The console displays the key of the created class or -1 if the class is not created.

See also:

IUiCommandTarget.Execute