Get the selectedPath from tree tag browser


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)

…you should use…


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

1 Like


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