[JW Lua] Insert Staff Or Reorder Staves

Martin Marris mmarris at notecraft.com
Sun Dec 13 14:00:33 CET 2020


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.

 

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.

 

staff = finale.FCStaff()

 

staff:Load(1)

staff:SetItemNo(100)

staff:Save(100)

 

staff:Load(2)

staff:SetItemNo(1)

staff:Save(1)

 

staff:Load(100)

staff:SetItemNo(2)

staff:Save(2)

 

Martin

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20201213/71fbbb27/attachment.htm>


More information about the JWLua mailing list