loaddocument

guerilla.loaddocument(file, warn, discardmissingref, loadrefs, loadasbox)

Load a new document

Parameters:
  • file (str) – The gproject file to load (or nil to display a file dialog)
  • warn (bool) – If true, warn the user when the current document is modified and wait for Ok or Cancel to proceed
  • discardmissingref (bool) – If true, don’t ask for the user to provide correct reference path and go on without the reference instead.
  • loadrefs ({string=string}) – Replace references
  • loadasbox (bool) – Force the document to load as bounding boxes
Returns:

true if the file was loaded (false when an error occured or the user canceled)

Return type:

bool