Export Measure Numbers, including edited bar number regions

Hi, I’m trying to figure out how to export measure numbers from Dorico in a way that will include edited measure number regions. I saw someone posted an apple script for exporting rehearsal markers in a similar way “Rehearsal Marks >> MIDI Markers Export” (couldn’t include link), but wondered if there might be a more direct way for handling bar numbers.
I need to be able to export a tempo map and midi and get the bar numbers as some kind of text or marker information so that if there are revisions requiring lettered measure numbers such as 4A, 4B, 4C etc.. those can be accounted for when exporting the midi.
In an ideal world I’d like to be able to do both at once: export rehearsal letters and bar numbers as markers along with the tempo map, but one-at-a-time will work if need be. Curious if anyone has had any experience with scripting this in Dorico or using applescript as in the post above.