<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jari,<br>
<br>
when changing the notehead symbols in a percussion layout,<br>
I have the problem that the noteheads are changed in the <br>
percussion layout table, but not automatically updated in the score.<br>
<br>
Now the strange thing: when I press "Undo" and then "Re-do" after<br>
running the script, the changed noteheads appear in the score. <br>
It seems to me that there is an update function missing internally <br>
in JW Lua that the Finale Re-do function seems to call.<br>
<br>
See script below and this youtube screencam video <br>
which demonstrates the behaviour in realtime:
<a class="moz-txt-link-freetext" href="http://youtu.be/_Oo4fLq7qiE">http://youtu.be/_Oo4fLq7qiE</a><br>
In the video I first show how the percussion layout looks before,<br>
then I run the script, then I undo and re-do it. Then the changed x
noteheads appear.<br>
<br>
They also do appear when I open the percussion layout dialog after
running the script<br>
and click on ok without changing anything. Clicking ok applies the
selected percussion layout once more.<br>
Simply pressing on CTRL-U or CTRL-D doesn't help.<br>
<br>
Any clues what might be wrong here ?<br>
<br>
Best regards,<br>
Jan<br>
<br>
To run the script, <b>f</b><b>irst select a percussion staff</b> <b>with
a percussion layout attached </b>(i.e. a staff that is set to
"Notation Style: Percussion"):<br>
<br>
local percstaff=finale.FCStaff()<br>
percstaff:Load(finenv.Region().StartStaff) --load selected
percussion staff<br>
if percstaff:IsPercussion() then<br>
local perclayoutID = percstaff:CalcPercussionLayoutID() <br>
local perclayout=finale.FCPercussionLayoutNotes()<br>
perclayout:LoadAllForItem(perclayoutID)<br>
if perclayout~=nil then<br>
for layoutnote in each(perclayout) do<br>
layoutnote:SetClosedNotehead(string.byte("x")) --set all
closed noteheads to "x"<br>
layoutnote:Save()<br>
end<br>
end<br>
end
</body>
</html>