Managing External Resources

You can manage external resources. External resources are imported from files that are not Modelica (.mo or .moe) files, for example, images.

You can add, remove or update a resource in a library. You can also organize resources by creating folders in the library structure and storing them.

Note: A resource is internally stored, while a file is an ordinary file in the file system on disk, for example, an image file.


Before you begin:

Make sure that:

  • The resources belong to a library.
  • The library contains a .mo or .moe file.
  • The resource name contains ASCII characters.
Tip: To store external resources, you can replicate the structure of the Modelica library. To do so, create, in your library folder, a new folder Resources. In that folder, create appropriate subfolders, for example, Images.
Note: You can also use resource tables to handle external resources. See Creating and Using Resource Tables.

See Also
About Dymola Behavior Modeling
Creating a Modelica Library or Dymola Behavior Library
  1. From the Behavior Tools section of the action bar, click Resources Management .

    Tip: You can also access this command from the Action Pad panel. To access the Action Pad panel, from the Tools section of the action bar, click Action Pad , or right-click an empty area and select Display > Action Pad.

    The Resources Manager dialog box appears showing the present resources.
  2. To import files as resources, use the following steps:
    1. In the Resources Manager dialog box, browse and select the folder where you want to store the imported files.
      The path appears in the text box.
    2. Click Import Resources.

      Tip: You can also right-click the folder where you want to store the imported files and select Import Resources.

      The ResourcesAddSelector dialog box appears.
    3. Browse for the files to import and select them.

      Tip: You can multiselect files by pressing Ctrl while selecting them.

    4. Click Open.
      The selected files are imported as resources to the selected resources folder in the Resources Manager dialog box.
  3. To update (replace) a resource from a file:
    1. In the Resources Manager dialog box, browse and select the resource to be updated (replaced).
      The path appears in the text box.
    2. Click Update Resource.

      Tip: You can also right-click the resource to be updated and select Update Resource.

      The ResourcesAddSelector dialog box appears.
    3. Browse for the file for updating the resource and select it.
    4. Click Open.
      The resource in the Resources Manager dialog box is updated with the selected file.
  4. To export resources as files:
    1. In the Resources Manager dialog box, browse and select the resources to export as files.

      Tip: You can multiselect resources by pressing Ctrl while selecting them.

      The paths of the selected resources appear in the text box.
    2. Click Export Resources.

      Tip: To export one resource as a file, you can also right-click the resource and select Export Resources.

      The ResourcesAddSelector dialog box appears.
    3. Browse for the folder where to store the resources as files.

      Tip: You can create a new folder by clicking New folder.

    4. Click Select Folder.
      The selected resources are pending to be exported to the selected folder as files.
      Note: If the selected folder contains files with the same name and extension as the ones exported, the existing files are overwritten without warning.
  5. To add a subfolder:

    Note: You cannot add a top level folder.

    1. In the Resources Manager dialog box, browse and select the folder in where to create the new folder.
      The path appears in the text box.
    2. Click Add Folder.

      Tip: You can also right-click the folder to which you want to add a subfolder, and select Add Folder.

      The Add Folder dialog box appears.
    3. Edit the name of the folder and click OK.
      The new folder is created in the Resources Manager dialog box. The path appears in the text box.
  6. To delete resources and subfolders:

    Note: You cannot delete a top level folder.

    1. In the Resources Manager dialog box, browse and select the resources and subfolders to be deleted.

      Tip: You can multiselect resources and subfolders by pressing Ctrl while selecting them.

      The paths appear in the text box.
    2. Click Delete.

      Tip: To delete one resource or one subfolder, you can also right-click the resource or subfolder you want to delete, and select Delete

      The selected resources and subfolders are removed from the Resources Manager dialog box.
  7. To rename a resource or subfolder:

    Note: You cannot rename a top level folder.

    1. In the Resources Manager dialog box, browse and select the resource or subfolder to be renamed.
      The path appears in the text box.
    2. Click Rename.

      Tip: You can also right-click the resource or subfolder to be updated and select Rename.

      The Rename dialog box appears.
    3. Edit the name.
    4. Click OK.
      The selected resource or subfolder is renamed in the Resources Manager dialog box.
  8. Click OK.
    The resources are modified. The Messages Reporting window displays the changes.