<div dir="ltr"><div dir="ltr">I have been experimenting with adding staff styles through JW Lua to change the transposition of an instrument and I'm getting some results I don't understand...<div><br></div><div>My code is based on the example script on the Lua-site (where "style" is a local decided by the program before):</div><div><br></div><div><div>    local musicRegion = finale.FCMusicRegion()</div><div>    musicRegion:SetCurrentSelection()</div><div>    local startbar = musicRegion:GetStartMeasure()</div><div>    local endbar = musicRegion:GetEndMeasure()</div><div>    local ssa = finale.FCStaffStyleAssign()</div><div>    ssa.StyleID = style</div><div>    ssa.StartMeasure = startbar</div><div>    ssa.StartMeasurePos = 0</div><div>    ssa.EndMeasure = endbar</div><div>    ssa:SetEndMeasurePosRight()</div><div>    ssa:SaveNew(1)</div></div><div><br></div><div>If I create a Staff Style and I name it "22. Transposition in G" and then set the local "style" to 22, this script works as expected.</div><div>For the next step I created all the necessary staff styles and saved them as a library. If I load the library in a new file, I can see the "22. Transposition in G" staff style, but when I run the script, a staff style is added, but this one doesn't transpose. It also doesn't show a name...</div><div><br></div><div>Any idea how I can make this work?</div><div><br></div><div>All the best,</div><div><br></div><div>Emile</div></div></div>