How to specify tag location for Parts in a view

I’m trying to write a Dynamo script to replace the process of: “selecting all items, filtering to just parts, annotate>tag all, checkbox the multi-category tag, click ok” for tagging the parts of a solid wall I have divided into parts (the screen shot shows the desired result)

I’m getting stuck with how to define the tag location (it seems Parts get handled differently to other elements?)

Can anyone help please?