Tagging Models and Files
You can assign Tags to your models and data files to help you with organizing them in the database. You can even assign tags to the tags themselves, thereby building a tree structure of tags — see The Tag Tree. In this regard, tags may remind you of folders on the file system. But tags go beyond that:
You can find models and files by searching on their assigned tags. You can even find such items by searching on ancestor tags — that is, tags assigned to the item’s tags themselves. For example, if you create a tag Interpolation Functions and add it under the tag Project A, you may assign the former tag to data files and then find those data files by searching on the latter tag.
-
-
-
You can search items based on their tag assignments at a particular time by Searching in Snapshots and Commits. Perhaps you want to find all items that had a particular tag, say In Progress, a month ago, or merely see what the tag tree looked like. When Searching in Branches, you search the present tag assignments.
The settings for tags are version controlled. If you change the title of a tag and click Save () in the Settings window, a new version of the tag is created. Any tag assignments involving the saved tag will, however, be left unchanged.
Creating New Tags
Click New Tag () in the Database section of the Home toolbar to open the New Tag dialog box. The Location field shows the database, repository, and branch that the new tag will be created in.
1
In the General tab, write the title for the new tag in the Title field.
2
Select the Add to selected models and files check box if you want the new tag to be automatically assigned to the current selection of model and files in The Model Manager Window or The Databases Window (depending on which window has focus). The check box is disabled if no models or files are selected.
3
In the Parent tags tab, select tags in The Tag Tree that will be assigned to the new tag — in other words, its parent tags. Leaving all nodes in the tree cleared will create the new tag under the root. You can filter the tree of available parent tags by writing a tag title in the text field above the tree.
The tree is empty when you create your first tag.
4
In the Comments field, write an optional comment for the associated commit.
5
Click OK to save the first version of the new tag in the database.
If a tag version is selected in The Model Manager Window or The Databases Window when you click New Tag (), that tag will be initially selected as a parent tag in The Tag Tree in the New Tag dialog box.
You can see your new tag under the branch node in The Databases Tree if you have selected Items when clicking Show () in the Databases window’s toolbar. You can also see it in the Tree View in The Model Manager Window as long as you have not written any search expressions in the search field or applied any filters.
The Tag Tree
Since tags can be assigned to other tags, items in a Model Manager database can be represented as nodes in a tree structure. Items assigned a particular tag appear as child nodes to the tag node. You can find a particular item in multiple positions in the tree as items can be assigned more than one tag. You may think of items not assigned any tags at all as placed under a hidden root tag. In The Databases Tree, such items appear as children under the nodes of Branches and Snapshots.
Assigning Tags to Items
To assign already created tags to an item, do one of the following:
Select the item in The Model Manager Window or The Databases Window and click the Set Tags button () in the Item section of the Home toolbar. You can select multiple models and files if you want to set the tag assignments of more than one item at once — see also Adding and Removing Tag Assignments.
Set assigned tags from the Tags section in the Settings window of Items. Do not forget to click Save () in the Settings window to save any changed tag assignments.
Set assigned tags from the Tags section in the Save window when saving a model version or in the Export window when exporting a file version — see also Saving Models to Databases and Exporting Output Directly to a Database.
All four options sets the tag assignments via a commit. The second, third, and fourth option also save a new version of the item. The first option does not, which may be preferable as to not create unnecessary Save Conflicts if, for example, a model item happens to be simultaneously open in the COMSOL Desktop.