Hello There,
I am just wondering how I can take the following script and modify it to contain a wildcard in the search path. As it stands the script works but I would like to modify it so it searches through all folders within “[MyProject]Root/WellOne” instead of searching only in that single tag folder. I would like it to search through the child folders as well.
Is this possible to do?
Below is my script:
instances = []
filter = “ " + “GasMeter” + " ”
myPath = ‘[MyProject]Root/WellOne’
results = system.tag.browse(path = str(myPath), filter = {‘name’:filter})
for result in results.getResults():
instances.append({“instanceStyle”:{“classes”:"",“instancePosition”: {}},“TagPath”: value + “/” + result[‘name’]})
return instances
Many thanks