Tagging (tag)

usage: adr.bat tag [-h] [--value VALUE] [--type {item,session,dataset,template}] [--query query_string] [--verbose]
                     [--test]
                     adr_server_url {add,remove,replace} tagname

Modify item, template, session, and dataset object tags in the ADR server.

positional arguments:
adr_server_url        ADR server URL. Example: http://nexus:cei@127.0.0.1:8000
{add,remove,replace}  Tag operation
tagname               The tag to modify

options:
-h, --help            show this help message and exit
--value VALUE         Tag value if needed
--type {item,session,dataset,template}
                        Select the object type to list. Default: item
--query query_string  Specify a query string using URI syntax.  Default: no filter
--verbose             Enable verbose mode
--test                Validate the operation, but do not perform it

This tool gathers a collection of objects (data items, sessions, datasets or templates) selected via a query string, and manipulates the tag strings.

The tag form is tag_name=value, where =value is optional. The tag_name is specified using an argument and value may be specified using the --value option. The resulting tag can be added to, removed from, or modified, on the selected objects. This tool cannot add a tag multiple times to the same object.

Tags in Ansys Dynamic Reporting are simple strings and can be applied to data items, sessions, and datasets. Tags are not required, but allow a wide variety of expression to define a data model. Without them, queries can be done only with the default data that Ansys Dynamic Reporting provides (dates, names, connections). Best practice involves creating a data model through the use of tags. Depending on the data model, the presence or absence of a tag is significant.

For example, one data model might attach significance to the verified tag, applied to a data item. Such a tag might indicate that the data item has gone through a review process, and the absence of such tag indicates that the process has not been performed. Other tags take the form key=value.

Using this format, tags are more fine-grained, allowing them to take on different values. For example, it is common to have variable=pressure or variable=density tags applied to image data that comes from physical simulations. Any number of tags may be specified and are separated by spaces when defined. So the tag string verified variable=viscosity is a valid list of two tags, the second one of which has a value.

Argument/OptionDescription
Arguments
adr_server_urlSpecifies the hostname, port, username and password of the ADR server to modify items on. For example: http://nexus:cei@127.0.0.1:8000 specifies a server running on the local machine (127.0.0.1) on port 8000. The username is nexus and the password is cei.
tag_operation {add,remove,replace}

Selects the type of modification to apply to the named tag. Options are:

  • add: Add the tag to the items.

  • remove: Remove the tag from the items.

  • replace: Replace the tag.

    Replace will add the tag if is does not exist. If it does exist, the value of the tag is changed or removed, depending on the --value option.

tag_nameThe name of the tag to modify.
Options
-h, --helpDisplays the usage message and exits.
--value [value]Specifies the tag's value, forming the string: {tag_name}={value} to be used as the tag. If this option is not specified, the tag is simply {tag_name}.
--verboseDisplays additional status and progress information during the operation.
--testSimulates the operation without actually performing it. This is helpful when debugging command lines, especially when used in conjunction with the --verbose option.
--type {item,template}Specifies the type of objects to delete. This command can delete data items or templates. It may delete sessions/datasets implicitly if they no are no longer referenced.
--query query_stringUses the query string to select the specific objects of the specified type (--type {option}) to perform the operation on. See Query Expressions for the syntax.