ModelBox.OnEditObject

Syntax

Sub OnEditObject(Sender: Object; Args: IModelBoxEditObjectEventArgs);

Begin

//set of operators;

End Sub OnEditObject;

Parameters

Sender. Parameter that returns the component that has generated the event.

Args. Parameter that returns the model that is being edited.

Description

The OnEditObject event occurs on opening a model for edit.

Example

Executing the example requires a form with two ModelBox components and two UiModel components. The component with the UiModel1 identifier is the data source for the component with the ModelBox1 identifier and UiModel2 is for ModelBox2. UiModel1 provides access to the model that is the system of non-linear equations.

Example is the OnEditObject event handler for the ModelBox1 component and is executed by pressing the button Edit or double mouse click to the equation on the Parameters panel of this component.

Sub ModelBox1OnEditObject(Sender: Object; Args: IModelBoxEditObjectEventArgs);

Begin

UiModel2.Object := Args.Object;

UiModel2.Active := True;

End Sub ModelBox1OnEditObject;

After executing the example the edited model is opened in the ModelBox2 component.

See also:

ModelBox