# CargoHold Methods to interact with the cargo hold interface. ```{figure} ../../images/cargohold_interface.png ``` - - - ## TRSCargoHold type Main record to interact with the {ref}`CargoHold` interface. - - - ## CargoHold.FindCargoBoundaries ```pascal function TRSCargoHold.FindCargoBoundaries(): TBoxArray; ``` Finds item boundaries and returns them as a TBoxArray. - - - ## CargoHold.FindToolBoundaries ```pascal function TRSCargoHold.FindToolBoundaries(): TBoxArray; ``` Finds item boundaries and returns them as a TBoxArray. - - - ## CargoHold.SetupInterface ```pascal procedure TRSCargoHold.SetupInterface(); ``` Internal method used to setup the {ref}`TRSCargoHold` coordinates. This is automatically called for you on the {ref}`CargoHold variable`. - - - ## CargoHold.IsOpen ```pascal function TRSCargoHold.IsOpen(): Boolean; ``` Returns true if the CargoHold pin is open. Example: ```pascal WriteLn CargoHold.IsOpen(); ``` - - - ## CargoHold.WaitOpen ```pascal function TRSCargoHold.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 TRSCargoHold.Close(escape: Boolean): Boolean; function TRSCargoHold.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}`TRSCargoHold` variable.