Exporting and Importing Multiple Slots
This section describes a utility to export and import multiple slots from one model to another. This utility is an alternative to exporting and importing entire objects as describe in
Exporting and Importing Objects.
Use the Export and Import Slots utility, described in this section, to export multiple slots from one model and import them into the another. Only the specified slots are exported, not all slots on the object. If the slots already exist in the destination model, the imported slots will only overwrite those specified slots and any references to those slots will remain including references by Plots, DMIs, Scripts, and other utilities. If the object does not exist in the destination model, it will be created, but will only contain data for the exported slots.
Exporting Slots
Initiate exporting of one or more slots from the main RiverWare workspace using the
Workspace, then
Slots and then
Export Slots menu. The dialog in
Figure 4.60 opens.
Figure 4.60 Screenshot of empty Export Slots dialog
In this dialog, specify two pieces:
• File name: type or select the path to a file using the “...” button
• Slots to export: Use the controls to add, remove and edit the slot selections. Slot selections can either be a new selection or can reference a Slot Set. Select the “+” button to add a selection. Then select slots or a Slot Set. The screenshot in
Figure 4.60 shows a sample with a Slot Set (of Hydrologic Inflow slots) and individual Inflow slots selected. Slot sets (see
Slot Sets) are shown in a tree-view that can be collapsed or expanded.
Figure 4.61 Screenshot of Export Slots dialog with slots selected
Select either simulation slots or custom slots; accounting slots and supplies are not supported.
When satisfied with the selection, select the Export button to perform the export. The specified file will be created and will contain a representation of each of the containing objects and the specified slots. All slot information including data, display units, convergence values, text description, series slot notes, and RPL logic for expression slots will be included in the file. Technically, this is a zip file containing a manifest file and one file per object.
Importing Slots
This section describe how to import slots from a file that you have exported using the export procedure described above. Once you have an exported slot file, import slots in the same or different model using the
Workspace, then
Slots and then
Import Slots menu from the RiverWare workspace. The dialog in
Figure 4.62 opens.
Figure 4.62 Screenshot of empty Import Slots dialog
In this dialog, first specify the File name of the file by typing in a path or using the “...” button to select it.
Next, select Preview to see what will be imported. A sample preview is shown below.
Figure 4.63 Screenshot of Import Slots Preview
The dialog shows a tree-view with a row for each Object and sub items for each Slot. A second example is shown in
Figure 4.64 with slots that cannot be imported. In this case a second, lower panel is added.
Figure 4.64 Screenshot if Import Slots preview with slots that cannot be imported
The Existing column shows whether each slot can be imported or not. The possibilities are:
• New Object: The object does not exist on the workspace of the destination model. The slot will be imported to a newly created object. Note, a new simulation object has all of the method selections and attributes of the exported object, but only data for the exported slots.
• New Slot: The object exists in the workspace but doesn’t contain the slot; the slot will be added to the object. The rest of the object will not be changed.
• Exists - Same Slot Type: The object and slot exists in the workspace; the slot will replace the slot on the object. The rest of the object will not be changed.
• Exists - Different Object Type: The object exists in the workspace but is a different type. The object and slots cannot be imported.
• Exists - Different Slot Types: The object and slot exists in the workspace but the slot is a different type. The slots cannot be imported.
• Aggregate Element Doesn't Exist: The object exists but is an aggregate object and the element doesn’t exist. The slots cannot be imported.
For those items that can be imported (the upper or single panel), select or de-select the check boxes to specify whether you actually want to import those slots. When satisfied, select Import.
When the import happens, RiverWare imports the slots to a temporary object and then copies the data and attributes to any existing objects/slots. This maintains any references to that slot by DMIs, Plots, scripts or other utilities.