Importing Files
You can import models and auxiliary 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 tagged by the corresponding tag.
Click Import () in the Database section of the Home toolbar to open the Import dialog box. A Target Location for the imported files will be automatically suggested based on the current selection in The Databases Window or The Model Manager Window (depending on which window is focused). You can change the target by clicking the link button and choose another branch in The Select Location Dialog Box.
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 type column — the type of file to import based on its file extension represented by an icon. The types are () for mph, () for mphphb, and () for any other file extension.
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 deleted 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 box.
Select the Include auxiliary files found in imported models check box to automatically import referenced files located on the file system that are found inside an imported model. The model will be automatically updated so that it references the corresponding file version in the database.
In the Tags field:
Select None to not assign any tags to imported files.
Select Import subfolders as tags to also import all subfolders found under a directory path in the Source column as Tags. Imported models and files found in these subfolders will be tagged by the corresponding tags.
Select Use existing tags to select tags to assign to imported models and files among tags already present in the database.
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 box, 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 auxiliary 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 box 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 above — the only difference is that Use existing tags is not available under Tags.