With Pure Variants 7.0.0, resource models were introduced. Resource models are used to share resources via the Pure Variants model server. Resource models are available in both local and remote projects.
Each project can have a maximum of one resource model and typically has the name of the project. The resources stored in a resource model can be used in the same project and in referencing projects.
Currently, the following resources are supported:
Java scripts
pvSCL code library files
Filter definitions
Pure Variants supports Java scripts for various tasks (transformation, editor extensions, import manipulators, etc.). In all places where Pure Variants supports JavaScripts, these can also be used from a resource model.
pvSCL code libraries can also be stored in resource models as pvSCL code library files. Until version 7.0.0, these could only be defined at feature or family models.
A resource model can be created by migrating an existing Pure Variants project. All Java scripts are copied into the resource model, and corresponding resources are created. The files are not modified or deleted.
To edit the resources in a resource model, the resource model must be opened either by double-clicking or expanding it in the Projects View.
New resources can be created using the "New" menu. The desired resource is selected from the New menu.
The wizard allows the entry of a resource name and the specification of the parent folder.
To edit a resource, it only needs to be double-clicked in the Variant Projects View. The appropriate editor opens, and the resource can be edited as usual.
To add a filter to a resource model, the normal filter dialog is used.
The filter dialog is used, and by enabling the option "Store to resource model", the filter is saved in the resource model. If the filter has already been saved in the workspace, it remains saved in the workspace.
To change a filter, the filter is loaded in the filter dialog and can then be modified. By closing the dialog with OK, the change is applied to the resource model.