The Tag Browse Tree does not allow for filtering the tags that are displayed, other than specifying a path under which you would like to see tags.
Well, ya learn something new every day…
After examining your link more closely, it looks like we do filter the nodes, but only the nodes at the level you specify.
I, for example, have multiple alarms in a directory:
[default]_Symulation_/sine. To display those alarms, I had to specify that exact directory. Now, I needed to modify the
filterBrowseNode component extension function. After enabling the extension function, I used this code:
return len(node.attributes) > 0 # make sure your indentation is correct
I don’t know how safe this is becuase I don’t know what other potential attributes a tag could have, but this code worked perfectly in my setup at various levels, returning only tags which had an alarm, as it’s stored as an attribute of the tag (see the
attributes entry below).
23:16:13.414 [Browser Thread: 51234] INFO Perspective.Designer.Workspace - TagDescription [name=Sine1, dataType=Float8, currentValue=[9.99984011283477, Bad_TrialExpired, Sun Jul 17 23:16:12 PDT 2022 (1658124972776)], objectType=AtomicTag, subTypeId=opc, attributes=[NodeAttribute[history]], hasChildren=false, displayFormat=#,##0.##, tooltip=null]
Unfortunately, that attribute is a HashSet - so I was unable to directly reference the value and identify the attribute as being related to History. Perhaps someone else could provide pointers for how to do that?