Limit number of Characters in Track Names

I know that I can lengthen the visible characters in the track names but is there a way to limit the number of characters in the name so that there is hard stop at a certain number of characters?

I want to tag the names but MackieMCU will only send a maximum number of 29 characters and I want to make sure the tag gets sent every time and is not cut off because I’ve made the track name too long.
Counting each time is not really an option as I’ve got over 1000 tracks in my template!