i have made a csv file with some bunch of tags using “system.tag.browseTags” in a folder and i can get their values with “system.tag.readBlocking” and then with a for function with “.value”, but how can i get in my CSV file only the name of tag example:
Tank 1 – 120
instead of
[Edge]/tanks/tank 1 – 120
I’m not entirely sure what you’re trying to do, it seems like you are writing out to a file. Instead of using the full path you want only the actual tag name?
system.tag.browseTags() returns a list of BrowseTag objects, you can call the the name variable from that.
tags = system.tag.browseTags(parentPath="")
for tag in tags:
print tag.name
wow thank you! it works but; i could not pass it yet to an array, i tried that my CSV file dont show the paths.
i have something like this:
tags = system.tag.browseTags(parentPath=“folder”)
name_list=[]
for tag in tags:
name_list.append( tags[tag].name )
but it gives me error about “TypeError: array.array indices must be integers”
PD sorry i did not know how to use the code format