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)
- function GetId(): Int64;
- procedure SetId(aId: Int64);
- function GetTitle(): WideString;
- procedure SetTitle(const aTitle: WideString);
- function GetDate(): TDateTime;
- procedure SetDate(aDate: TDateTime);
- function GetWasUsedElementsMarked(): Boolean;
- procedure SetWasUsedElementsMarked(aMarked: Boolean);
- function GetWasStockUpdated(): Boolean;
- procedure SetWasStockUpdated(aUpdated: Boolean);
- function GetWasReusableWasteAddedToStocks(): Boolean;
- procedure SetWasReusableWasteAddedToStocks(aAdded: Boolean);
- function GetCancelled(): Boolean;
- procedure SetCancelled(aCancelled: Boolean);
- function GetSheetCount(): Cardinal;
- procedure SetSheetCount(aCount: Cardinal);
- function GetPieceCount(): Cardinal;
- procedure SetPieceCount(aCount: Cardinal);
- function GetSheetField2d(): Int64;
- procedure SetSheetField2d(aField: Int64);
- function GetPieceField2d(): Int64;
- procedure SetPieceField2d(aField: Int64);
- function GetWasteField2d(): Int64;
- procedure SetWasteField2d(aField: Int64);
- function GetRecycledField2d(): Int64;
- procedure SetRecycledField2d(aField: Int64);
- function GetCutCount2d(): Integer;
- procedure SetCutCount2d(aCount: Integer);
- function GetCutLength2d(): Double;
- procedure SetCutLength2d(aLength: Double);
- function GetSheetLength1d(): Int64;
- procedure SetSheetLength1d(aLength: Int64);
- function GetPieceLength1d(): Int64;
- procedure SetPieceLength1d(aLength: Int64);
- function GetWasteLength1d(): Int64;
- procedure SetWasteLength1d(aLength: Int64);
- function GetRecycledLength1d(): Int64;
- procedure SetRecycledLength1d(aLength: Int64);
- function GetCutCount1d(): Integer;
- procedure SetCutCount1d(aCount: Integer);
- function GetOnChange(): INotifyEvent;
- 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)
- function CreateResult(): IResult;
- procedure Add(aResult: IResult);
- procedure DeleteByIndex(aIndex: Cardinal);
- procedure DeleteById(aId: Int64);
- procedure Remove(const aResult: IResult);
- function IndexOf(const aResult: IResult): Integer; overload;
- function IndexOf(aId: Int64): Integer; overload;
- function GetCount(): Integer;
- function GetByIndex(aIndex: Cardinal): IResult;
- function GetById(aId: Int64): IResult;
- function GetOnAdd(): IResultChangeEvent;
- function GetOnRemove(): IResultChangeEvent;
- procedure Reload();
- procedure BeginUpdate();
- procedure EndUpdate();
- function IsUpdating(): Boolean;
- 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 ParametersaIndexCardinalZero-based position within a collection.ValueThe 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
OnChangeinstead.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
OnChangeinstead.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;ReturnsA new result interface instance.
- Method name
- Add()
- Type
- procedure
- Description
Add an item or handler.
Declaration
procedure Add(aResult: IResult); safecall;Parameters
- Method name
- DeleteByIndex()
- Type
- procedure
- Description
Delete the item at the specified zero-based index.
Declaration
procedure DeleteByIndex(aIndex: Cardinal); safecall;ParametersaIndexCardinalZero-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;ParametersaIdInt64TonCut object identifier.
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(const aResult: IResult); safecall;Parameters
- Method name
- IndexOf()
- Type
- Integer
- Description
Return the zero-based index of the matching item.
Declaration
function IndexOf(const aResult: IResult): Integer; overload; safecall;ParametersReturnsZero-based index of the matching item, or-1when 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;ParametersaIdInt64TonCut object identifier.ReturnsZero-based index of the matching item, or-1when 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;ParametersaIdInt64TonCut object identifier.ReturnsThe 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
EndUpdateinfinally. 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
OnChangeonly if an add, remove, or itemOnChangeoccurred in the scope; suppressed add/remove callbacks are not replayed. Raises an error without a matchingBeginUpdate.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;ReturnsReturnstruewhile the interface is inside aBeginUpdate/EndUpdatebatch.
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)
- 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;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerZero-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)
- procedure Add(aHandler: IResultChangeEventHandler);
- procedure Remove(aHandler: IResultChangeEventHandler);
- 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
- Method name
- Remove()
- Type
- procedure
- Description
Remove an item or handler.
Declaration
procedure Remove(aHandler: IResultChangeEventHandler); safecall;Parameters
- 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;ParametersaSenderIUnknownObject that raised the event.aIndexIntegerEvent payload field for index.