This content has been marked as final. Show 5 replies
you need to write procedure which goes through all groups and finds first *Style with name you are searching for - then return ID
when you have ID - you don't need to care about groups tree ;)
...which might cause a problem with 2 identically named styles that are in different groups... which is possible; i haven't tested what happens though...
With the power comes the responsibility. With all my clients so far, they've agreed to live by the rule that says that all their style names will be unique even though they're using groups. That makes it easy to just loop through all the styles until you find the one with the name you're looking for.
And if the user forgets and dupes the names, he might or might not get the right result.
nothing happens :) procedure will return ID of FIRST *Style ;)
50/50 that this will be right style ;)
Thank you for hints
I'll probably have to accept that it's not ideal for the time being.
I will certainly give a try to the get-the-ID-and-you're-sorted approach.
So far I thought that IDs were unreliable ephemeral entities that won't survive "Save as..." operation or INX export. (although this might be just my prejudice as I never tested it)