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.

IResults adds BeginUpdate, EndUpdate, IsUpdating, and OnChange in engine version 25. BeginUpdate, EndUpdate, IsUpdating, and GetOnChange are appended after the existing vtable slots under the same interface GUID. See Update scopes for nesting, notifications, and error handling. Rebuild plugins against the matching SDK; the Desktop host requires an exact engine version match.

Interfaces

Declarations are shown in Pascal and, where the SDK's generated language-support manifest lists the member for C++, in C++; the build fails if that manifest no longer matches TonCutPluginSdk.hpp. There is no C# declaration: C# plugins are native-shim-only, so a C++ shim owns every interface on this page. Methods are listed with their accessors folded into properties; open Vtable order for the exact slot sequence, and see ABI and marshalling for type sizes and ownership rules.

IResult

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

IID
{17353E5E-1398-498A-B88F-D8DAB11F3DDC}
Parent
IUnknown (implicit: a Delphi interface without a parent is IUnknown)
Unit
uIResult

The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.

Vtable order (42 methods, slots 3 to 44, after the three IUnknown slots)
  1. function GetId(): Int64;
  2. procedure SetId(aId: Int64);
  3. function GetTitle(): WideString;
  4. procedure SetTitle(const aTitle: WideString);
  5. function GetDate(): TDateTime;
  6. procedure SetDate(aDate: TDateTime);
  7. function GetWasUsedElementsMarked(): Boolean;
  8. procedure SetWasUsedElementsMarked(aMarked: Boolean);
  9. function GetWasStockUpdated(): Boolean;
  10. procedure SetWasStockUpdated(aUpdated: Boolean);
  11. function GetWasReusableWasteAddedToStocks(): Boolean;
  12. procedure SetWasReusableWasteAddedToStocks(aAdded: Boolean);
  13. function GetCancelled(): Boolean;
  14. procedure SetCancelled(aCancelled: Boolean);
  15. function GetSheetCount(): Cardinal;
  16. procedure SetSheetCount(aCount: Cardinal);
  17. function GetPieceCount(): Cardinal;
  18. procedure SetPieceCount(aCount: Cardinal);
  19. function GetSheetField2d(): Int64;
  20. procedure SetSheetField2d(aField: Int64);
  21. function GetPieceField2d(): Int64;
  22. procedure SetPieceField2d(aField: Int64);
  23. function GetWasteField2d(): Int64;
  24. procedure SetWasteField2d(aField: Int64);
  25. function GetRecycledField2d(): Int64;
  26. procedure SetRecycledField2d(aField: Int64);
  27. function GetCutCount2d(): Integer;
  28. procedure SetCutCount2d(aCount: Integer);
  29. function GetCutLength2d(): Double;
  30. procedure SetCutLength2d(aLength: Double);
  31. function GetSheetLength1d(): Int64;
  32. procedure SetSheetLength1d(aLength: Int64);
  33. function GetPieceLength1d(): Int64;
  34. procedure SetPieceLength1d(aLength: Int64);
  35. function GetWasteLength1d(): Int64;
  36. procedure SetWasteLength1d(aLength: Int64);
  37. function GetRecycledLength1d(): Int64;
  38. procedure SetRecycledLength1d(aLength: Int64);
  39. function GetCutCount1d(): Integer;
  40. procedure SetCutCount1d(aCount: Integer);
  41. function GetOnChange(): INotifyEvent;
  42. function GetOnIdChange(): IIdChangeEvent;

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;
  • Property name
    Title
    Type
    WideString
    Description

    Human-readable title shown to users.

    Declaration

    property Title: WideString read GetTitle write SetTitle;
  • Property name
    Date
    Type
    TDateTime
    Description

    Gets or sets date.

    Declaration

    property Date: TDateTime read GetDate write SetDate;
  • Property name
    WasUsedElementsMarked
    Type
    Boolean
    Description

    Whether TonCut already marked the source elements as used.

    Declaration

    property WasUsedElementsMarked: Boolean read GetWasUsedElementsMarked write SetWasUsedElementsMarked;
  • Property name
    WasStockUpdated
    Type
    Boolean
    Description

    Whether TonCut already updated stock quantities.

    Declaration

    property WasStockUpdated: Boolean read GetWasStockUpdated write SetWasStockUpdated;
  • Property name
    WasReusableWasteAddedToStocks
    Type
    Boolean
    Description

    Whether TonCut already moved reusable waste into stock.

    Declaration

    property WasReusableWasteAddedToStocks: Boolean read GetWasReusableWasteAddedToStocks write SetWasReusableWasteAddedToStocks;
  • Property name
    Cancelled
    Type
    Boolean
    Description

    Whether the result or operation was cancelled.

    Declaration

    property Cancelled: Boolean read GetCancelled write SetCancelled;
  • Property name
    SheetCount
    Type
    Cardinal
    Description

    Number of sheets used by the result.

    Declaration

    property SheetCount: Cardinal read GetSheetCount write SetSheetCount;
  • Property name
    PieceCount
    Type
    Cardinal
    Description

    Total number of pieces tracked by the project or result.

    Declaration

    property PieceCount: Cardinal read GetPieceCount write SetPieceCount;
  • Property name
    SheetField2d
    Type
    Int64
    Description

    Total sheet area used by the result.

    Declaration

    property SheetField2d: Int64 read GetSheetField2d write SetSheetField2d;
  • Property name
    PieceField2d
    Type
    Int64
    Description

    Gets or sets piece field 2d.

    Declaration

    property PieceField2d: Int64 read GetPieceField2d write SetPieceField2d;
  • Property name
    WasteField2d
    Type
    Int64
    Description

    Waste area tracked by the result or sheet.

    Declaration

    property WasteField2d: Int64 read GetWasteField2d write SetWasteField2d;
  • Property name
    RecycledField2d
    Type
    Int64
    Description

    Area recovered through recycling.

    Declaration

    property RecycledField2d: Int64 read GetRecycledField2d write SetRecycledField2d;
  • Property name
    CutCount2d
    Type
    Integer
    Description

    Gets or sets cut count 2d.

    Declaration

    property CutCount2d: Integer read GetCutCount2d write SetCutCount2d;
  • Property name
    CutLength2d
    Type
    Double
    Description

    Gets or sets cut length 2d.

    Declaration

    property CutLength2d: Double read GetCutLength2d write SetCutLength2d;
  • Property name
    SheetLength1d
    Type
    Int64
    Description

    Total sheet length used by the result.

    Declaration

    property SheetLength1d: Int64 read GetSheetLength1d write SetSheetLength1d;
  • Property name
    PieceLength1d
    Type
    Int64
    Description

    Gets or sets piece length 1d.

    Declaration

    property PieceLength1d: Int64 read GetPieceLength1d write SetPieceLength1d;
  • Property name
    WasteLength1d
    Type
    Int64
    Description

    Waste length tracked by the result or sheet.

    Declaration

    property WasteLength1d: Int64 read GetWasteLength1d write SetWasteLength1d;
  • Property name
    RecycledLength1d
    Type
    Int64
    Description

    Length recovered through recycling.

    Declaration

    property RecycledLength1d: Int64 read GetRecycledLength1d write SetRecycledLength1d;
  • Property name
    CutCount1d
    Type
    Integer
    Description

    Gets or sets cut count 1d.

    Declaration

    property CutCount1d: Integer read GetCutCount1d write SetCutCount1d;
  • Property name
    OnChange
    Type
    INotifyEvent
    Description

    Event fired when the object or collection changes.

    Declaration

    property OnChange: INotifyEvent read GetOnChange;
  • Property name
    OnIdChange
    Type
    IIdChangeEvent
    Description

    Event fired when an identifier changes.

    Declaration

    property OnIdChange: IIdChangeEvent read GetOnIdChange;

IResults

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

IID
{473F9048-B682-44EF-8151-91A280FCA879}
Parent
IUnknown (implicit: a Delphi interface without a parent is IUnknown)
Unit
uIResults

The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.

Vtable order (17 methods, slots 3 to 19, after the three IUnknown slots)
  1. function CreateResult(): IResult;
  2. procedure Add(aResult: IResult);
  3. procedure DeleteByIndex(aIndex: Cardinal);
  4. procedure DeleteById(aId: Int64);
  5. procedure Remove(const aResult: IResult);
  6. function IndexOf(const aResult: IResult): Integer; overload;
  7. function IndexOf(aId: Int64): Integer; overload;
  8. function GetCount(): Integer;
  9. function GetByIndex(aIndex: Cardinal): IResult;
  10. function GetById(aId: Int64): IResult;
  11. function GetOnAdd(): IResultChangeEvent;
  12. function GetOnRemove(): IResultChangeEvent;
  13. procedure Reload();
  14. procedure BeginUpdate();
  15. procedure EndUpdate();
  16. function IsUpdating(): Boolean;
  17. function GetOnChange(): INotifyEvent;

Properties

  • Property name
    Count
    Type
    Integer
    Description

    Number of items currently exposed by the interface.

    Declaration

    property Count: Integer read GetCount;
  • 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;
    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. Suppressed during a collection update scope; the outermost changed scope emits one collection OnChange instead.

    Declaration

    property OnAdd: IResultChangeEvent read GetOnAdd;
  • Property name
    OnRemove
    Type
    IResultChangeEvent
    Description

    Event fired when an item is removed. Suppressed during a collection update scope; the outermost changed scope emits one collection OnChange instead.

    Declaration

    property OnRemove: IResultChangeEvent read GetOnRemove;
  • Property name
    OnChange
    Type
    INotifyEvent
    Description

    Collection notification emitted once when the outermost changed update scope ends (engine version 25). Empty scopes emit nothing. Outside a scope, adds/removes use OnAdd/OnRemove, and item edits do not emit this collection event. Item events remain active inside collection scopes.

    Declaration

    property OnChange: INotifyEvent read GetOnChange;

Methods

  • Method name
    CreateResult()
    Type
    IResult
    Description

    Create a new result instance.

    Declaration

    function CreateResult(): IResult; safecall;
    Returns
    A new result interface instance.
  • Method name
    Add()
    Type
    procedure
    Description

    Add an item or handler.

    Declaration

    procedure Add(aResult: IResult); safecall;
    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;
    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;
    Parameters
    aId
    Int64
    TonCut object identifier.
  • Method name
    Remove()
    Type
    procedure
    Description

    Remove an item or handler.

    Declaration

    procedure Remove(const aResult: IResult); safecall;
    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;
    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;
    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;
    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;
  • Method name
    BeginUpdate()
    Type
    procedure
    Description

    Begin a nested collection notification scope (engine version 25). Balance each call with EndUpdate in finally. Changes take effect immediately; the scope provides no rollback.

    Declaration

    procedure BeginUpdate(); safecall;
  • Method name
    EndUpdate()
    Type
    procedure
    Description

    End one collection notification scope (engine version 25). The outermost call emits one collection OnChange only if an add, remove, or item OnChange occurred in the scope; suppressed add/remove callbacks are not replayed. Raises an error without a matching BeginUpdate.

    Declaration

    procedure EndUpdate(); safecall;
  • Method name
    IsUpdating()
    Type
    Boolean
    Description

    Report whether at least one collection notification scope remains open (engine version 25). Nested scopes remain active until the outermost EndUpdate.

    Declaration

    function IsUpdating(): Boolean; safecall;
    Returns
    Returns true while the interface is inside a BeginUpdate / EndUpdate batch.

IResultChangeEventHandler

Callback sink consumed by the matching change-event interface.

IID
{284F4647-1FBD-467F-8B27-3D7A1D6D3E6D}
Parent
IUnknown
Unit
uIResultChangeEvent

The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.

Vtable order (1 methods, slots 3 to 3, after the three IUnknown slots)
  1. procedure Invoke(aSender: IUnknown; aResult: IResult; aIndex: Integer);

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;
    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.

IID
{76638535-78D5-4E30-902F-C61868B9D9DE}
Parent
IUnknown
Unit
uIResultChangeEvent

The SDK's language-support manifest lists no C++ member of this interface. If your TonCutPluginSdk.hpp leaves it opaque, declare the interface yourself in the vtable order below.

Vtable order (3 methods, slots 3 to 5, after the three IUnknown slots)
  1. procedure Add(aHandler: IResultChangeEventHandler);
  2. procedure Remove(aHandler: IResultChangeEventHandler);
  3. procedure Invoke(aSender: IUnknown; aResult: IResult; aIndex: Integer);

Methods

  • Method name
    Add()
    Type
    procedure
    Description

    Add an item or handler.

    Declaration

    procedure Add(aHandler: IResultChangeEventHandler); safecall;
    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;
    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;
    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?