Importing Files
You can import models and data files from the file system directly into a database without, for example, having to open each model in the COMSOL Desktop and manually save it. You can also choose to preserve any folder organization you made on the file system by importing folders as Tags. Files inside a folder will then be assigned the corresponding tag.
Click Import () in the Database section of the Home toolbar to open the Import dialog. A Target Location for the imported files will be automatically suggested based on the current selection in The Model Manager Window, The Databases Window, or The Maintenance Window (depending on which window has focus). You can change the target by clicking the link button and choosing another branch in The Select Location Dialog.
Click Add Folder () to add a folder containing files to import. Files in subfolders will also be included.
Click Add File () to add a file to import.
Click Exclude File () to exclude selected files from being imported.
The files to import are shown in a table with columns:
The File column — the filename of the file to import.
The Source column — the directory path to the folder that was selected if added via Add Folder or the file path if added via Add File.
Click OK to begin the import. Clicking Stop in the progress window stops the import, but already imported files are not removed from the database. You can see a summary of the import in the Messages window in the Model Builder workspace once the import finishes.
Import Options
The import procedure can be configured under Options in the Import dialog.
Select the Include auxiliary files found in imported models checkbox to automatically import files on the file system that are referenced as input by an MPH file. This includes, for example, interpolation functions, geometry parts, CAD assemblies, and many other types of auxiliary data used by a model. The model will be automatically updated so that it references the corresponding auxiliary data saved in the database. Files referenced as output by a model are not imported.
In the Tags list:
Select None to not assign any tags to imported items.
Select Import subfolders as tags to import all subfolders found under a directory path in the Source column as Tags. Imported models and files found in these subfolders will be assigned the corresponding tags.
Select Use existing tags to select tags to assign to imported models and files among tags already present in the database.
In the Computed data list:
Select Include or exclude based on application settings if built, computed, and plotted data of an MPH file should be included or excluded in the imported model based on the corresponding save settings on the model’s root node and the save settings in the Preferences window. See also The Root Settings Window in the COMSOL Multiphysics Reference Manual.
Select Include to include built, computed, and plotted data of an MPH file in the imported model, regardless of any save settings.
Select Exclude to exclude built, computed, and plotted data of an MPH file in the imported model, regardless of any save settings.
Model Manager will detect and skip duplicate files, that is files with the same filename and file content. This includes both files that you have explicitly added to the table in the Import dialog, as well as referenced auxiliary files if you have selected Include auxiliary files found in imported models. If duplicate files are located in different subfolders, and you have selected Import subfolders as tags, the imported files will still be assigned tags corresponding to all those subfolders.
Import to Target Tag
You can import models and data files into the database so that all items are placed under a specific tag in The Tag Tree.
Right-click a tag and select Import (). The Import dialog opens with the title of the selected tag shown in a Target tag field. You add folders and files to import in exactly the same way as before — the only difference is that Use existing tags is not available under Tags.