IMsCalculationState.Breakpoint

Syntax

Breakpoint: IMsBreakpoint;

Description

The Breakpoint property returns a breakpoint for transformation problem.

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier. This container should have a transformation problem with the OBJ_PROBLEM identifier.

Add links to the Metabase and Ms system assemblies.

Sub UserProc;
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("=== Abort calculation ===");
    End If;
    _calc.Stop;
End Sub;

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

See also:

IMsCalculationState