Skip to end of metadata
Go to start of metadata
Description

Returns an any attribute for a specific tag.

This Function is Deprecated

The functionality of this method has been replaced by system.tag.read()

Syntax

system.tag. getAttribute( tagPath, attribute )

  • Parameters

String  tagPath  - The full path to the tag you want to edit. Note: you can specify the Tag provider name in square brackets at the beginning of the parentPath string. Example: "[myTagProvider]MyTagsFolder". If the tag provider name is left off then the project default provider will be used.

String  attribute  - The name of a tag attribute. See Tag Properties for more information.

  • Returns

Object  -  The value of the attribute.

  • Scope

All

Code Examples
Code Snippet
#Example 1:
 
expression = system.tag.getAttribute("Tag3", "Expression")
print expression
  • No labels

3 Comments

  1. Anonymous

    If this is deprecated how would you do it now? This is what I would do.

     

    #Example 1:
      
    expression = system.tag.read("Tag3.Expression")
    print expression
    1. Thank you for pointing out the ambiguity. I've added a link at the top of the page that leads to the system.tag.read() page. 

  2. Anonymous

    That's almost the way it is. Just use the "value" field to get the value:

    print expression.value

     

    Different attributes can be read at the same time using system.tag.readAll.

    #Example 2:
    attributes = system.tag.readAll(["Tag3.Expression", "Tag3.Tooltip"]) 
    for att in attributes:  
        print att.value