<div dir="ltr"><div>Your script will just create a corrupted file (as you have discovered). The only way to reorder staves is with Instrument Used lists. (I forget the exact name in the PDK Framework, but it's there.) IUList 0 is Scroll View, and each system in Page View has an IUList with a number equal to the System Number. Each Staff Set (in Scroll View) is also an IUList. I believe there are constants for the 8 staff list IUList numbers.</div><div><br></div><div>Each Linked Part has its own IULists. The only way to access them is to switch to that part and then modify them from within the part.<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 13, 2020 at 7:02 AM Martin Marris <<a href="mailto:mmarris@notecraft.com">mmarris@notecraft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" lang="EN-US"><div class="gmail-m_-3870982935134623269WordSection1"><p class="gmail-m_-3870982935134623269MsoPlainText">I found a way to re-order the staves by re-ordering the Item Numbers. But it scrambles the score. Only some of the staff data get moved. The staff names and the transposition settings move from one staff to the other, but other data, such as clefs, and all of the notes, remain on the original staff.<u></u><u></u></p><p class="gmail-m_-3870982935134623269MsoPlainText"><u></u> <u></u></p><p class="gmail-m_-3870982935134623269MsoPlainText">Here is the most basic version of my code. I also tried loading the staves into a table and iterating backwards, but got the same result.<u></u><u></u></p><p class="gmail-m_-3870982935134623269MsoPlainText"><u></u> <u></u></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff = finale.FCStaff()<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)"><u></u> <u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:Load(1)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:SetItemNo(100)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:Save(100)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)"><u></u> <u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:Load(2)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:SetItemNo(1)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:Save(1)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)"><u></u> <u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:Load(100)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:SetItemNo(2)<u></u><u></u></span></p><p class="gmail-m_-3870982935134623269MsoPlainText"><span style="color:rgb(197,90,17)">staff:Save(2)</span><u></u><u></u></p><p class="gmail-m_-3870982935134623269MsoPlainText"><u></u> <u></u></p><p class="gmail-m_-3870982935134623269MsoPlainText">Martin<u></u><u></u></p><p class="gmail-m_-3870982935134623269MsoPlainText"><u></u> <u></u></p></div></div>_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div>