Finally started playing with this, and decided it was powerful enough to start the migration away from my legacy tools (script libraries which output similar results) over to Tag Report Tool (via script). Wish this available long ago! Big fan!
Two issues I'm seeing initially:
-
When operating from screen with limited resolution (docked laptop), the Tag Report Tool window appears on a different display and extends beyond what's available on that display - the top & bottom of the window are both off-screen. I first need to resize the window in the x-direction (which relocates the top of the window to top of my screen), then resize the top of the window and drag until window is within bounds of my screen, then move it over to the same screen as my Designer.
-
Any way to get the Path (not the Full Path) property from system.tag.query()
?
Posting here because from the tag report tool, I can add results columns for both Path & Full Path:
Then, can copy the query to JSON and see the properties in the results (in this example, to get all UDT types of a provider):
{
"query": {
"options": {
"includeUdtMembers": true,
"includeUdtDefinitions": true
},
"condition": {
"path": "_types_*",
"tagType": "UdtType",
"attributes": {
"values": [],
"requireAll": true
}
},
"returnProperties": [
"name"
]
},
"columns": [
{
"alias": "",
"key": "name",
"type": "property",
"visible": true,
"width": 122
},
{
"alias": "",
"key": "path",
"type": "property",
"visible": true,
"width": 243
},
{
"alias": "",
"key": "fullpath",
"type": "property",
"visible": true,
"width": 243
}
]
}
Results are as expected, with 'Relative Path' in one column, 'Full Path' in another. However, "Copy as Script" and executing from Script Console appears to return only the fullPath property. I've attempted to add the 'path' as a return parameter (see below) to no avail.
query = {
"options": {
"includeUdtMembers": True,
"includeUdtDefinitions": True
},
"condition": {
"path": "_types_*",
"tagType": "UdtType",
"attributes": {
"values": [],
"requireAll": True
}
},
"returnProperties": [
"name",
"path"
]
}
A print of all keys in the first return object shows there is only the 'fullPath' property, and the 'path' property is omitted entirely.
Sure, it's easy enough to strip the "[provider]" off of the full path for each result but hoping to avoid the extra processing if this property is readily available.