Results

This page covers IResult, IResults, IResultChangeEvent, and IResultChangeEventHandler. Result interfaces summarize optimization output that TonCut persists after a run, including counts, areas or lengths, and stock or waste update flags.

Interfaces

IResult

Saved optimization result summary covering counts, areas or lengths, and stock-processing flags.

Source: SDK/include/pascal/uIResult.pas

Properties

  • Property name
    Id
    Type
    Int64
    Description

    Persistent numeric identifier used by TonCut to track the object.

    Declaration

    property Id: Int64 read GetId write SetId;

    Published SDK declaration languages: Pascal.

  • Property name
    Title
    Type
    WideString
    Description

    Human-readable title shown to users.

    Declaration

    property Title: WideString read GetTitle write SetTitle;

    Published SDK declaration languages: Pascal.

  • Property name
    Date
    Type
    TDateTime
    Description

    Gets or sets date.

    Declaration

    property Date: TDateTime read GetDate write SetDate;

    Published SDK declaration languages: Pascal.

  • Property name
    WasUsedElementsMarked
    Type
    Boolean
    Description

    Whether TonCut already marked the source elements as used.

    Declaration

    property WasUsedElementsMarked: Boolean read GetWasUsedElementsMarked write SetWasUsedElementsMarked;

    Published SDK declaration languages: Pascal.

  • Property name
    WasStockUpdated
    Type
    Boolean
    Description

    Whether TonCut already updated stock quantities.

    Declaration

    property WasStockUpdated: Boolean read GetWasStockUpdated write SetWasStockUpdated;

    Published SDK declaration languages: Pascal.

  • Property name
    WasReusableWasteAddedToStocks
    Type
    Boolean
    Description

    Whether TonCut already moved reusable waste into stock.

    Declaration

    property WasReusableWasteAddedToStocks: Boolean read GetWasReusableWasteAddedToStocks write SetWasReusableWasteAddedToStocks;

    Published SDK declaration languages: Pascal.

  • Property name
    Cancelled
    Type
    Boolean
    Description

    Whether the result or operation was cancelled.

    Declaration

    property Cancelled: Boolean read GetCancelled write SetCancelled;

    Published SDK declaration languages: Pascal.

  • Property name
    SheetCount
    Type
    Cardinal
    Description

    Number of sheets used by the result.

    Declaration

    property SheetCount: Cardinal read GetSheetCount write SetSheetCount;

    Published SDK declaration languages: Pascal.

  • Property name
    PieceCount
    Type
    Cardinal
    Description

    Total number of pieces tracked by the project or result.

    Declaration

    property PieceCount: Cardinal read GetPieceCount write SetPieceCount;

    Published SDK declaration languages: Pascal.

  • Property name
    SheetField2d
    Type
    Int64
    Description

    Total sheet area used by the result.

    Declaration

    property SheetField2d: Int64 read GetSheetField2d write SetSheetField2d;

    Published SDK declaration languages: Pascal.

  • Property name
    PieceField2d
    Type
    Int64
    Description

    Gets or sets piece field 2d.

    Declaration

    property PieceField2d: Int64 read GetPieceField2d write SetPieceField2d;

    Published SDK declaration languages: Pascal.

  • Property name
    WasteField2d
    Type
    Int64
    Description

    Waste area tracked by the result or sheet.

    Declaration

    property WasteField2d: Int64 read GetWasteField2d write SetWasteField2d;

    Published SDK declaration languages: Pascal.

  • Property name
    RecycledField2d
    Type
    Int64
    Description

    Area recovered through recycling.

    Declaration

    property RecycledField2d: Int64 read GetRecycledField2d write SetRecycledField2d;

    Published SDK declaration languages: Pascal.

  • Property name
    CutCount2d
    Type
    Integer
    Description

    Gets or sets cut count 2d.

    Declaration

    property CutCount2d: Integer read GetCutCount2d write SetCutCount2d;

    Published SDK declaration languages: Pascal.

  • Property name
    CutLength2d
    Type
    Double
    Description

    Gets or sets cut length 2d.

    Declaration

    property CutLength2d: Double read GetCutLength2d write SetCutLength2d;

    Published SDK declaration languages: Pascal.

  • Property name
    SheetLength1d
    Type
    Int64
    Description

    Total sheet length used by the result.

    Declaration

    property SheetLength1d: Int64 read GetSheetLength1d write SetSheetLength1d;

    Published SDK declaration languages: Pascal.

  • Property name
    PieceLength1d
    Type
    Int64
    Description

    Gets or sets piece length 1d.

    Declaration

    property PieceLength1d: Int64 read GetPieceLength1d write SetPieceLength1d;

    Published SDK declaration languages: Pascal.

  • Property name
    WasteLength1d
    Type
    Int64
    Description

    Waste length tracked by the result or sheet.

    Declaration

    property WasteLength1d: Int64 read GetWasteLength1d write SetWasteLength1d;

    Published SDK declaration languages: Pascal.

  • Property name
    RecycledLength1d
    Type
    Int64
    Description

    Length recovered through recycling.

    Declaration

    property RecycledLength1d: Int64 read GetRecycledLength1d write SetRecycledLength1d;

    Published SDK declaration languages: Pascal.

  • Property name
    CutCount1d
    Type
    Integer
    Description

    Gets or sets cut count 1d.

    Declaration

    property CutCount1d: Integer read GetCutCount1d write SetCutCount1d;

    Published SDK declaration languages: Pascal.

  • Property name
    OnChange
    Type
    INotifyEvent
    Description

    Event fired when the object or collection changes.

    Declaration

    property OnChange: INotifyEvent read GetOnChange;

    Published SDK declaration languages: Pascal.

  • Property name
    OnIdChange
    Type
    IIdChangeEvent
    Description

    Event fired when an identifier changes.

    Declaration

    property OnIdChange: IIdChangeEvent read GetOnIdChange;

    Published SDK declaration languages: Pascal.


IResults

Collection interface used to create, enumerate, query, and reload a shared Desktop object set.

Source: SDK/include/pascal/uIResults.pas

Properties

  • Property name
    Count
    Type
    Integer
    Description

    Number of items currently exposed by the interface.

    Declaration

    property Count: Integer read GetCount;

    Published SDK declaration languages: Pascal.

  • Property name
    Items
    Type
    IResult
    Description

    Indexed property used to read one item from the collection.

    Declaration

    property Items[aIndex: Cardinal]: IResult read GetByIndex; default;

    Published SDK declaration languages: Pascal.

    Index Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
    Value
    The collection item located at the supplied index.
  • Property name
    OnAdd
    Type
    IResultChangeEvent
    Description

    Event fired when an item is added.

    Declaration

    property OnAdd: IResultChangeEvent read GetOnAdd;

    Published SDK declaration languages: Pascal.

  • Property name
    OnRemove
    Type
    IResultChangeEvent
    Description

    Event fired when an item is removed.

    Declaration

    property OnRemove: IResultChangeEvent read GetOnRemove;

    Published SDK declaration languages: Pascal.

Methods

  • Method name
    CreateResult()
    Type
    IResult
    Description

    Create a new result instance.

    Declaration

    function CreateResult(): IResult; safecall;

    Published SDK declaration languages: Pascal.

    Returns
    A new result interface instance.
  • Method name
    Add()
    Type
    procedure
    Description

    Add an item or handler.

    Declaration

    procedure Add(aResult: IResult); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aResult
    Saved-result instance being queried or modified.
  • Method name
    DeleteByIndex()
    Type
    procedure
    Description

    Delete the item at the specified zero-based index.

    Declaration

    procedure DeleteByIndex(aIndex: Cardinal); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aIndex
    Cardinal
    Zero-based position within a collection.
  • Method name
    DeleteById()
    Type
    procedure
    Description

    Delete the item with the specified TonCut identifier.

    Declaration

    procedure DeleteById(aId: Int64); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aId
    Int64
    TonCut object identifier.
  • Method name
    Remove()
    Type
    procedure
    Description

    Remove an item or handler.

    Declaration

    procedure Remove(const aResult: IResult); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aResultconst
    Saved-result instance being queried or modified.
  • Method name
    IndexOf()
    Type
    Integer
    Description

    Return the zero-based index of the matching item.

    Declaration

    function IndexOf(const aResult: IResult): Integer; overload; safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aResultconst
    Saved-result instance being queried or modified.
    Returns
    Zero-based index of the matching item, or -1 when no match exists.
  • Method name
    IndexOf()
    Type
    Integer
    Description

    Return the zero-based index of the matching item.

    Declaration

    function IndexOf(aId: Int64): Integer; overload; safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aId
    Int64
    TonCut object identifier.
    Returns
    Zero-based index of the matching item, or -1 when no match exists.
  • Method name
    GetById()
    Type
    IResult
    Description

    Return the item stored under the specified TonCut identifier.

    Declaration

    function GetById(aId: Int64): IResult; safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aId
    Int64
    TonCut object identifier.
    Returns
    The matching result interface instance.
  • Method name
    Reload()
    Type
    procedure
    Description

    Reload the underlying data from the host or storage layer.

    Declaration

    procedure Reload(); safecall;

    Published SDK declaration languages: Pascal.


IResultChangeEventHandler

Callback sink consumed by the matching change-event interface.

Source: SDK/include/pascal/uIResultChangeEvent.pas

Methods

  • Method name
    Invoke()
    Type
    procedure
    Description

    Handle the event callback when the owning event interface invokes it.

    Declaration

    procedure Invoke(aSender: IUnknown; aResult: IResult; aIndex: Integer); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aSender
    IUnknown
    Object that raised the event.
    aResult
    Saved-result instance being queried or modified.
    aIndex
    Integer
    Zero-based position within a collection.

IResultChangeEvent

Event interface with Add, Remove, and Invoke hooks for collection or entity change notifications.

Source: SDK/include/pascal/uIResultChangeEvent.pas

Methods

  • Method name
    Add()
    Type
    procedure
    Description

    Add an item or handler.

    Declaration

    procedure Add(aHandler: IResultChangeEventHandler); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aHandler
    The handler interface instance to use.
  • Method name
    Remove()
    Type
    procedure
    Description

    Remove an item or handler.

    Declaration

    procedure Remove(aHandler: IResultChangeEventHandler); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aHandler
    The handler interface instance to use.
  • Method name
    Invoke()
    Type
    procedure
    Description

    Raise the typed change event for the current payload.

    Declaration

    procedure Invoke(aSender: IUnknown; aResult: IResult; aIndex: Integer); safecall;

    Published SDK declaration languages: Pascal.

    Parameters
    aSender
    IUnknown
    Object that raised the event.
    aResult
    Event payload field for result.
    aIndex
    Integer
    Event payload field for index.

Was this page helpful?