Any ideas what the error means and how to avoid it?
UPDATE: the third argument needs to be the literal "string" which gets around the error, although the function works as expected either way. What's more concerning is that even with no error here, calling this a few times later leads to Illustrator crashing in another thread when path art, which was not tagged, is simply scaled. It turns out it just doesn't want to be called during a callback. Push context and pop context doesn't help. 😞
When it's manually called, all is OK. It's far less useful, but I guess something is better than nothing.
I did see that, thanks. Dictionaries are awesome, which is reason enough to not use tags. 😉
The real purpose of the tags is to address multiple user requests to get around some scripting limitations. Unless these users and I are missing something, scripts can read tags, but not dictionaries, and cannot access XML IDs. My intent was to copy the XML IDs into tags, so scripts could find specific text objects easier. If a script can access an Action or a menu item, that might enable a script to manually update the tags itself when it needs them.
If scriptable plugins hasn't been a post topic yet, maybe it's worth starting one...