IMsCalculationState.Breakpoint

Syntax

Breakpoint: IMsBreakpoint;

Description

The Breakpoint property returns a breakpoint for transformation problem.

Example

Executing the example requires a modeling container with the CONT_MODEL identifier. The transformation problem with the OBJ_PROBLEM identifier must be present in this container.

Sub Main;

Var

mb: IMetabase;

pModelSpace: IMetabaseObjectDescriptor;

_prob: IMsProblem;

settings: IMsProblemCalculationSettings;

_calc: IMsProblemCalculation;

state: IMsCalculationState;

Point: IMsBreakpoint;

Begin

mb := MetabaseClass.Active;

pModelSpace := mb.ItemById("CONT_MODEL");

_prob := mb.ItemByIdNamespace("OBJ_PROBLEM", pModelSpace.Key).Bind As IMsProblem;

settings := _prob.CreateCalculationSettings;

_calc := _prob.Calculate(settings);

Repeat

_calc.StepOver;

state := _calc.CalculationState;

Debug.WriteLine(state.Message);

Until state.Model <> Null;

Point := state.Breakpoint;

If Point <> Null Then

Debug.WriteLine("Control point is available: "+Point.Enable.ToString);

Debug.WriteLine("Control point key: "+Point.Key.ToString);

Debug.WriteLine("Control point name: "+Point.Name);

Debug.WriteLine("=== Aborting calculation ===");

End If;

_calc.Stop;

End Sub Main;

After executing the example information about the breakpoint, if it is set for the current calculation step, is displayed in the console window.

See also:

IMsCalculationState