Scripting Module - browseTags()

So I’ve browsed for and gotten a bunch of tags. Now I’m looking for a type of tag, say boolean for example.

tag.dataType() doesn’t work
getAttribute(path,“dataType”) doesn’t work

is there something that does?

You can call getAttribute(tagPath, “DataType”). Case matters.

Thanks Travis. Is not in the list of attributes and every other reference I could find showed it as dataType.

How do I compare it?

system.tag.getAttribute(tag.fullPath, "DataType") != "Boolean"

is always true

You can do this:str(system.tag.getAttribute(tag.fullPath, "DataType")) == "Boolean"You have to cast it to a string.


But that’s slow. Is there more stuff that comes back from browseTags() then just, tag.path, tag.fullPath, tag.isFolder(), tag.isUDT(), tag.isOPC(), tag.isDB(), tag.type

No, but I can put in a request to get that added.