Tag Browse Tree and filterTag extension [ BUG in 8.1.23 ? ][Vision]

Hi guys,

I'm trying to use the filterTag extension in a Tag Browse Tree in Vision but I can't make it works as I would.

Here is the full root of the folder:
Immagine 2022-12-30 140000

I add this code to the filterTag extension and it works good

def filterTag(self, tag):

	test = ['Allarmi', 'Archivio']

	if tag.name in test:
		return False
	else:
		return True

I have this as result, as you can see the Allarmi and Archivio folders are not in the list.
Immagine 2022-12-30 143252

What I would like to do is instead of remove the folders, I want to have a dataset with only the folder to show, so I simply edit the code in this way

def filterTag(self, tag):

	test = ['Allarmi', 'Archivio']

	if tag.name in test:
		return True
	else:
		return False

in this case I was expecting that only the folders in the dataset are shown, but instead I have no more folders in the tree
Immagine 2022-12-30 143430

What do I wrong?

I must be missing something. The root folder in your first example is totally different from your final example. Are they the same tag browse tree instance?

That's exactly the point. The tag browse tree is the same, I just edit the filterTag extension script.

If I filter in this way

def filterTag(self, tag):

	test = ['Allarmi', 'Archivio']

	if tag.name in test:
		return True
	else:
		return False

returning True in the case if I have a match of tag.name with the dataset, the root folder seems disappear and I have only ROOT -> default.

If I reverse the script returning False at first, the root folder back as the first example except the 2 values in the dataset that are filter.

Wow; that's totally unexpected. What version are you running?

8.1.23 .. Yeah looks strange.. I mean I can just filter the folders I want to remove, but should be faster to do vice versa.

I tested this on version 8.1.20, and I was not able to replicate this result. My tag browse tree works as expected:
image

First:

def filterTag(self, tag):
	test = ['Ramp', 'Sine']
	
	if tag.name in test:
		return False
	else:
		return True

Result:
image

Second:

def filterTag(self, tag):
	test = ['Ramp', 'Sine']
	
	if tag.name in test:
		return True
	else:
		return False

Result:
image

I tried to upgrade to 8.1.23 to see if I could replicate the error there, but I'm running into this:
image

I'll try again later when I have more time if nobody else comes up with anything first

Thanks for your help, so looks like it is a bug of my version, do you know how can I do to warn somebody of the Ignition team in this case?

I finally made the time to update my system 8.1.23, but I was still unable to replicate the problem.
image

The tag browse tree worked as expected on my system. Perhaps it's time to get support involved.

Hi Justin, sorry for my late answer. I'll try to contact the support at this point, thanks for your time.

1 Like