Import of Origin and LabPlot projects
We had to revise our release plans because of a feature that many users have asked for and that took more time than estimated – the import of © OriginLab Origin projects. Since this feature is quite important and since we had some implementation for it already available in the code, we decided to finalize this development and to include this feature in the next release of LabPlot.
Support for foreign proprietary formats is always notoriously incomplete because of different versions to support, the lack of documentations, the variety of features that need to be mapped from the source to the target application, missing features, etc.
So, it will be hard to impossible to “finalize” such a feature but we plan to release something that is usable. In the first release having this feature we’ll first concentrate on the import of Origin’s data containers – workbooks and matrix books and 2D-plots. LabPlot heavily benefits here from the work done in liborigin and SciDAVIs projects and also the current development in this area is being performed in collaboration with liborigin and SciDAVis’ developers.
A new dialog for project import was added. Upon selection of a supported file, there is a preview of the project. The user selects the source objects to be imported (multiple selection is allowed) and also provides the target folder where the selected objects have to be imported into.
Folder structures of arbitrary complexity for both sides – source and target projects – are supported. The import is implemented in an undo/redo-able way and it is possible to perform several imports from the same project file whereas the user is warned if objects are already existing in the target folder.
Internally, during the import we create a temporary LabPlot project where we try to map Origin’s entities onto LabPlot’s native structures. We traverse the project tree and import (move) the selected parts of it into the target project currently being opened in LabPlot. The code for this is quite general and flexible and almost automatically provides another nice feature – the import of LabPlot projects. With this it becomes for example possible to merge two or more LabPlot projects or parts of them.
Given the nature of the internal implementation, we support the import of all objects in LabPlot projects. Also, the dependency checks during the import are in place. E.g., if the user selects a worksheet having different plots and curves, which on the other hand consume the data coming from some spreadsheets in the project, the required spreadsheets are automatically selected and imported too. The following video demonstrates the import of such a worksheet together with the corresponding data containers (spreadsheets):