// Generated .IDL file (by the OLE/COM Object Viewer)
// 
// typelib filename: optimal2dx.dll

[
  uuid(E1AEC0A5-8A7C-47BC-B2BE-992CEB0C9B0D),
  version(1.0),
  helpstring("optimal2dx Library")
]
library optimal2dx
{
    // TLib :     // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
    importlib("stdole2.tlb");

    // Forward declare all types defined in this typelib
    interface IOptimization2DX;
    dispinterface IOptimization2DXEvents;

    [
      odl,
      uuid(E7C266EF-2634-42F9-A1AC-96C7DB050DB2),
      version(1.0),
      helpstring("Dispatch interface for Optimization2DX Object"),
      dual,
      oleautomation
    ]
    interface IOptimization2DX : IDispatch {
        [id(0x00000001), propget]
        HRESULT OptimizationLevel([out, retval] long* Value);
        [id(0x00000001), propput]
        HRESULT OptimizationLevel([in] long Value);
        [id(0x00000002), propget]
        HRESULT BladeWidth([out, retval] long* Value);
        [id(0x00000002), propput]
        HRESULT BladeWidth([in] long Value);
        [id(0x00000003), propget]
        HRESULT NumberOfDemandPieces([out, retval] long* Value);
        [id(0x00000003), propput]
        HRESULT NumberOfDemandPieces([in] long Value);
        [id(0x00000004), propget]
        HRESULT RandomSeed([out, retval] long* Value);
        [id(0x00000004), propput]
        HRESULT RandomSeed([in] long Value);
        [id(0x00000005), propget]
        HRESULT ComputerID([out, retval] BSTR* Value);
        [id(0x00000008), propget]
        HRESULT IsRegistered([out, retval] long* Value);
        [id(0x00000009), propget]
        HRESULT NumberOfRepositoryPieces([out, retval] long* Value);
        [id(0x00000009), propput]
        HRESULT NumberOfRepositoryPieces([in] long Value);
        [id(0x0000000b), propget]
        HRESULT CallerName([out, retval] BSTR* Value);
        [id(0x0000000c)]
        HRESULT StartGuillotine();
        [id(0x0000000d)]
        HRESULT StartNested();
        [id(0x0000000e)]
        HRESULT StartMultiStages();
        [id(0x0000000f)]
        HRESULT SetDemandPiece(
                        [in] long Index, 
                        [in] long Length, 
                        [in] long Width, 
                        [in] long CanRotate, 
                        [in] long ExternalID, 
                        [in] long Priority);
        [id(0x00000010)]
        HRESULT GetDemandPiece(
                        [in] long Index, 
                        [out] long* Length, 
                        [out] long* Width, 
                        [out] long* CanRotate, 
                        [out] long* ExternalID, 
                        [out] long* Priority);
        [id(0x00000011)]
        HRESULT Stop();
        [id(0x00000012)]
        HRESULT SetRepositoryPiece(
                        [in] long Index, 
                        [in] long Length, 
                        [in] long Width, 
                        [in] long TrimTop, 
                        [in] long TrimLeft, 
                        [in] long TrimBottom, 
                        [in] long TrimRight, 
                        [in] long ExternalID, 
                        [in] long Priority, 
                        [in] long NumberOfHoles);
        [id(0x00000013)]
        HRESULT GetRepositoryPiece(
                        [in] long Index, 
                        [out] long* Length, 
                        [out] long* Width, 
                        [out] long* TrimTop, 
                        [out] long* TrimLeft, 
                        [out] long* TrimBottom, 
                        [out] long* TrimRight, 
                        [out] long* ExternalID, 
                        [out] long* Priority, 
                        [out] long* NumberOfHoles);
        [id(0x00000014), propget]
        HRESULT Version([out, retval] BSTR* Value);
        [id(0x00000016), propget]
        HRESULT Expired([out, retval] long* Value);
        [id(0x00000017), propget]
        HRESULT TotalNumberOfUtilizedDemandPieces([out, retval] long* Value);
        [id(0x0000001a)]
        HRESULT RegisterOptimization2DX(
                        [in] BSTR UserName, 
                        [in] BSTR SerialNumber);
        [id(0x0000001c), propget]
        HRESULT TotalNumberOfUtilizedRepositoryPieces([out, retval] long* Value);
        [id(0x0000001f), propget]
        HRESULT WhichStartMethodStarted([out, retval] long* Value);
        [id(0x00000020), propget]
        HRESULT MinimalWidthBreakage([out, retval] long* Value);
        [id(0x00000020), propput]
        HRESULT MinimalWidthBreakage([in] long Value);
        [id(0x00000021), propget]
        HRESULT MaximalCutLength([out, retval] long* Value);
        [id(0x00000021), propput]
        HRESULT MaximalCutLength([in] long Value);
        [id(0x00000022), propget]
        HRESULT FirstDirectionMultiStages([out, retval] long* Value);
        [id(0x00000022), propput]
        HRESULT FirstDirectionMultiStages([in] long Value);
        [id(0x00000023), propget]
        HRESULT ShowWarnings([out, retval] long* Value);
        [id(0x00000023), propput]
        HRESULT ShowWarnings([in] long Value);
        [id(0x00000025)]
        HRESULT NumberOfCuttings(
                        [in] long SheetIndex, 
                        [out] long* NumberOfCuts, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000026)]
        HRESULT NumberOfUtilizedDemandPieces(
                        [in] long SheetIndex, 
                        [out] long* NumberOfUtilizedPieces, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000027)]
        HRESULT NumberOfWastePieces(
                        [in] long SheetIndex, 
                        [out] long* NumberOfWastePieces, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000028)]
        HRESULT SurfaceCovered(
                        [in] long SheetIndex, 
                        [out] double* SurfaceCovered, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000029)]
        HRESULT GetCut(
                        [in] long SheetIndex, 
                        [in] long CutIndex, 
                        [out] long* TopX, 
                        [out] long* TopY, 
                        [out] long* BottomX, 
                        [out] long* BottomY, 
                        [out] long* CutThickness, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x0000002a)]
        HRESULT GetUtilizedDemandPiece(
                        [in] long SheetIndex, 
                        [in] long PieceIndex, 
                        [out] long* TopX, 
                        [out] long* TopY, 
                        [out] long* BottomX, 
                        [out] long* BottomY, 
                        [out] long* Rotated, 
                        [out] long* RepositoryIndex, 
                        [out] long* DemandIndex, 
                        [out] long* RepositoryExternalID, 
                        [out] long* DemandExternalID);
        [id(0x0000002b)]
        HRESULT GetWastePiece(
                        [in] long SheetIndex, 
                        [in] long WasteIndex, 
                        [out] long* TopX, 
                        [out] long* TopY, 
                        [out] long* BottomX, 
                        [out] long* BottomY, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x0000002c)]
        HRESULT DemandPieceUtilized(
                        [in] long DemandIndex, 
                        [out] long* SheetIndex, 
                        [out] long* RepositoryIndex, 
                        [out] long* DemandExternalID, 
                        [out] long* RepositoryExternalID);
        [id(0x00000024)]
        HRESULT RepositoryPieceUtilized(
                        [in] long Index, 
                        [out] long* Utilized, 
                        [out] long* RepositoryExternalID);
        [id(0x0000002e)]
        HRESULT GetUtilizedRepositoryPiece(
                        [in] long SheetIndex, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000006), propget]
        HRESULT CutAllStripsFirst([out, retval] long* Value);
        [id(0x00000006), propput]
        HRESULT CutAllStripsFirst([in] long Value);
        [id(0x00000007), propget]
        HRESULT OnlyPiecesOfTheSameHeightInAStrip([out, retval] long* Value);
        [id(0x00000007), propput]
        HRESULT OnlyPiecesOfTheSameHeightInAStrip([in] long Value);
        [id(0x0000000a), propget]
        HRESULT HeightTolerance([out, retval] long* Value);
        [id(0x0000000a), propput]
        HRESULT HeightTolerance([in] long Value);
        [id(0x00000019), propput]
        HRESULT ManualArrangeNumberOfCuts([in] long rhs);
        [id(0x0000001b), propput]
        HRESULT ManualArrangeNumberOfPieces([in] long rhs);
        [id(0x0000001d), propput]
        HRESULT ManualArrangeNumberOfWastes([in] long rhs);
        [id(0x0000001e)]
        HRESULT ManualArrangeSetCut(
                        [in] long Index, 
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long CutThickness);
        [id(0x0000002d)]
        HRESULT ManualArrangeSetPiecePosition(
                        [in] long Index, 
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long Rotated, 
                        [in] long ExternalID);
        [id(0x0000002f)]
        HRESULT ManualArrangeSetWasteRectangle(
                        [in] long Index, 
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY);
        [id(0x00000030)]
        HRESULT ManualArrangeGuillotineAddPiece(
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long Rotated, 
                        [in] long CutType, 
                        [in] long ExternalID, 
                        [out] long* IndexWasteRemoved, 
                        [out] long* IndexWasteInserted1, 
                        [out] long* IndexWasteInserted2, 
                        [out] long* IndexCutInserted1, 
                        [out] long* IndexCutInserted2, 
                        [out] long* AllowAdd);
        [id(0x00000031)]
        HRESULT ManualArrangeIsValidPositionForAPiece(
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long CutType, 
                        [out] long* AllowCut);
        [id(0x00000032)]
        HRESULT ManualArrangeNStagesAddPiece(
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long Rotated, 
                        [in] long ExternalID, 
                        [out] long* IndexWasteRemoved, 
                        [out] long* IndexWasteInserted1, 
                        [out] long* IndexWasteInserted2, 
                        [out] long* IndexCutInserted1, 
                        [out] long* IndexCutInserted2, 
                        [out] long* AllowAdd);
        [id(0x00000033)]
        HRESULT ManualArrangeGuillotineRemovePiece([in] long IndexOfPiece);
        [id(0x00000034)]
        HRESULT ManualArrangeGuillotineMovePiece(
                        [in] long Index, 
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long Rotated, 
                        [in] long CutType, 
                        [out] long* AllowMove);
        [id(0x00000035)]
        HRESULT ManualArrangeAddCut(
                        [in] long X, 
                        [in] long Y, 
                        [in] long CutType, 
                        [in] long CutThickness, 
                        [out] long* AllowCut, 
                        [out] long* IndexOfAddedCut, 
                        [out] long* IndexOfRemovedWaste, 
                        [out] long* IndexOfAddedWaste1, 
                        [out] long* IndexOfAddedWaste2);
        [id(0x00000036)]
        HRESULT ManualArrangeGlueCuts(
                        [in] long IndexCut1, 
                        [in] long IndexCut2, 
                        [in] long IndexCut3, 
                        [out] long* IndexNewCut1, 
                        [out] long* IndexNewCut2, 
                        [out] long* IndexNewCut3, 
                        [out] long* AllowJoin);
        [id(0x00000038)]
        HRESULT ManualArrangeRemoveCut(
                        [in] long IndexCut, 
                        [out] long* IndexRemovedWaste1, 
                        [out] long* IndexRemovedWaste2, 
                        [out] long* IndexInsertedWaste);
        [id(0x00000039)]
        HRESULT ManualArrangeSwitchCut(
                        [in] long IndexCut, 
                        [out] long* JoinPerformed);
        [id(0x0000003a)]
        HRESULT ManualArrangeIsValidSwitchCut(
                        [in] long IndexCut, 
                        [out] long* AllowSwitch);
        [id(0x0000003b)]
        HRESULT ManualArrangeIsValidRemoveCut(
                        [in] long IndexCut, 
                        [out] long* AllowRemove);
        [id(0x0000003c)]
        HRESULT ManualArrangeSwitchCutOrientation(
                        [in] long IndexCut, 
                        [in] long X, 
                        [in] long Y, 
                        [out] long* AllowSwitchOrientation);
        [id(0x0000003d)]
        HRESULT ManualArrangeIsValidSwitchCutOrientation(
                        [in] long IndexCut, 
                        [in] long X, 
                        [in] long Y, 
                        [out] long* AllowSwitchOrientation);
        [id(0x0000003e)]
        HRESULT ManualArrangeIsValidAddCut(
                        [in] long X, 
                        [in] long Y, 
                        [in] long CutType, 
                        [in] long CutThickness, 
                        [out] long* AllowAddCut);
        [id(0x00000040), propget]
        HRESULT ManualArrangeOptimizationType([out, retval] long* Value);
        [id(0x00000040), propput]
        HRESULT ManualArrangeOptimizationType([in] long Value);
        [id(0x0000003f)]
        HRESULT ManualArrangeGuillotineIsValidPositionForAPiece(
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long CutType, 
                        [out] long* AllowCut);
        [id(0x00000015), propget]
        HRESULT TrimType([out, retval] long* Value);
        [id(0x00000015), propput]
        HRESULT TrimType([in] long Value);
        [id(0x00000037), propget]
        HRESULT NumberOfStages([out, retval] long* Value);
        [id(0x00000037), propput]
        HRESULT NumberOfStages([in] long Value);
        [id(0x00000018)]
        HRESULT SaveToFile(
                        [in] BSTR FileName, 
                        [in] long SaveInputData, 
                        [in] long SaveParameters, 
                        [in] long SaveResults);
        [id(0x00000041)]
        HRESULT LoadFromFile([in] BSTR FileName);
        [id(0x00000042)]
        HRESULT SetRepositoryHole(
                        [in] long RepositoryIndex, 
                        [in] long HoleIndex, 
                        [in] long TopX, 
                        [in] long TopY, 
                        [in] long BottomX, 
                        [in] long BottomY, 
                        [in] long ExternalIDofHole);
        [id(0x00000043)]
        HRESULT GetRepositoryHole(
                        [in] long RepositoryIndex, 
                        [in] long HoleIndex, 
                        [out] long* TopX, 
                        [out] long* TopY, 
                        [out] long* BottomX, 
                        [out] long* BottomY, 
                        [out] long* ExternalIDofHole);
        [id(0x00000044)]
        HRESULT BasicCNC(
                        [in] long SheetIndex, 
                        [out] BSTR* CNC, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000045), propput]
        HRESULT Identification([in] long rhs);
        [id(0x00000046), propget]
        HRESULT MinimalUsefulSize([out, retval] long* Value);
        [id(0x00000046), propput]
        HRESULT MinimalUsefulSize([in] long Value);
        [id(0x00000047), propget]
        HRESULT MinStripSize([out, retval] long* Value);
        [id(0x00000047), propput]
        HRESULT MinStripSize([in] long Value);
        [id(0x00000048), propget]
        HRESULT MaxStripSize([out, retval] long* Value);
        [id(0x00000048), propput]
        HRESULT MaxStripSize([in] long Value);
        [id(0x00000049), propget]
        HRESULT AllowPrecuts([out, retval] long* Value);
        [id(0x00000049), propput]
        HRESULT AllowPrecuts([in] long Value);
        [id(0x0000004a), propget]
        HRESULT PrecutDirection([out, retval] long* Value);
        [id(0x0000004a), propput]
        HRESULT PrecutDirection([in] long Value);
        [id(0x0000004b), propget]
        HRESULT GenerateBasicCNC([out, retval] long* Value);
        [id(0x0000004b), propput]
        HRESULT GenerateBasicCNC([in] long Value);
        [id(0x0000004d)]
        HRESULT WasteSurface(
                        [in] long SheetIndex, 
                        [out] double* Surface, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x0000004e)]
        HRESULT GarbageWaste(
                        [in] long SheetIndex, 
                        [out] double* Surface, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x0000004f)]
        HRESULT CutSurface(
                        [in] long SheetIndex, 
                        [out] double* Surface, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000052)]
        HRESULT CutLength(
                        [in] long SheetIndex, 
                        [out] double* Length, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000053)]
        HRESULT StartNestingRolls();
        [id(0x00000054)]
        HRESULT BasicCNCNumberOfCuts(
                        [in] long SheetIndex, 
                        [out] long* NumberOfCuts, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000055)]
        HRESULT BasicCNCGetCut(
                        [in] long SheetIndex, 
                        [in] long CutIndex, 
                        [out] long* TopX, 
                        [out] long* TopY, 
                        [out] long* BottomX, 
                        [out] long* BottomY, 
                        [out] long* CutThickness, 
                        [out] long* Level, 
                        [out] long* Type, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x0000004c)]
        HRESULT GetCutMultiStages(
                        [in] long SheetIndex, 
                        [in] long CutIndex, 
                        [out] long* TopX, 
                        [out] long* TopY, 
                        [out] long* BottomX, 
                        [out] long* BottomY, 
                        [out] long* CutThickness, 
                        [out] long* Level, 
                        [out] long* RepositoryIndex, 
                        [out] long* RepositoryExternalID);
        [id(0x00000051), propget]
        HRESULT MaximalGarbageSize([out, retval] long* Value);
        [id(0x00000051), propput]
        HRESULT MaximalGarbageSize([in] long Value);
        [id(0x00000050), propget]
        HRESULT SinglePieceStrips([out, retval] long* Value);
        [id(0x00000050), propput]
        HRESULT SinglePieceStrips([in] long Value);
    };

    [
      uuid(E8BE5D3C-9B56-4892-8F45-3CC008857C63),
      version(1.0),
      helpstring("Events interface for Optimization2DX Object")
    ]
    dispinterface IOptimization2DXEvents {
        properties:
        methods:
            [id(0x00000001)]
            HRESULT OnFinish();
            [id(0x00000003)]
            HRESULT OnProgress();
            [id(0x00000002)]
            HRESULT OnAfterManualArrange();
    };

    [
      uuid(50C1F407-FFDB-4A07-8AD8-356579BF3A40),
      version(1.0),
      helpstring("Optimization2DX Object")
    ]
    coclass Optimization2DX {
        [default] interface IOptimization2DX;
        [default, source] dispinterface IOptimization2DXEvents;
    };
};
