# CargoHold Methods to interact with the cargo hold interface. ```{figure} ../../images/cargohold_interface.png ``` - - - ## TCargoHold type Main record to interact with the {ref}`CargoHold` interface. - - - ## CargoHold.FindCargoBoundaries ```pascal function TCargoHold.FindCargoBoundaries(): TBoxArray; ``` Finds item boundaries and returns them as a TBoxArray. - - - ## CargoHold.FindToolBoundaries ```pascal function TCargoHold.FindToolBoundaries(): TBoxArray; ``` Finds item boundaries and returns them as a TBoxArray. - - - ## CargoHold.SetupInterface ```pascal procedure TCargoHold.SetupInterface(); ``` Internal method used to setup the {ref}`TCargoHold` coordinates. This is automatically called for you on the {ref}`CargoHold variable`. - - - ## CargoHold.IsOpen ```pascal function TCargoHold.IsOpen(): Boolean; ``` Returns true if the CargoHold pin is open. Example: ```pascal WriteLn CargoHold.IsOpen(); ``` - - - ## CargoHold.WaitOpen ```pascal function TCargoHold.WaitOpen(time: Integer = 600; interval: Integer = -1): Boolean; ``` Returns true if the CargoHold pin opens within `time` milliseconds.. Example: ```pascal WriteLn CargoHold.WaitOpen(); ``` - - - ## CargoHold.Close ```pascal function TCargoHold.Close(escape: Boolean): Boolean; function TCargoHold.Close(escapeProbability: Single = 0): Boolean; overload; ``` Closes the CargoHold, depending on `escape` or `escapeProbability the function will either click the button or press escape key. Example: ```pascal WriteLn CargoHold.Close(); ``` - - - ## CargoHold variable Global {ref}`TCargoHold` variable.