add_document

add_document(path: unicode, progress: ProgressCallback) Optional[Node]

Add a new document in the current project and return it. Do not close any opened document.

Parameters
  • path (unicode) – The document path to add to the project. This path is also used to retrieve the document node.

  • progress (ProgressCallback) – The optional progress object to track the loading progression

Return type

Optional[Node]

Raises

RuntimeError – if the file can’t be loaded.