Get the selectedPath from tree tag browser

Hello,

I m trying to get the selectedPath on clic on the tree tag browser but not working. is it a bug or i’m doing something wrong.

Hi @lachguerabdallah, shouldn’t it be .selectedPaths?

For example: selectedPath = event.source.selectedPaths.getValueAt(0,0)

hi @matthew.ayre
thanks for answering.
I have made a mistake in the code, but it still does not work, it does nothing and does not give any error!

@lachguerabdallah, instead of using a mouseClicked event you could use a propertyChange event with the following script:

if event.propertyName == "selectedPaths":
	print event.newValue.getValueAt(0,0)
1 Like

...you should use...

2 Likes

Thank you very much, it works perfectly with your solution.

1 Like

Hi,

How to right click the tag and copy the tag path in tag tree browser?

any way to do this?

Hi @prasath.t, not sure I’ve never tried. I might get a chance to try later. I’ll let you know if I find anything.

Ok … please let me know