<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jari,<br>
<br>
I am still struggling with this problem (changing percussion
noteheads, see description below in the mail from April). In a
modified script dragging the screen (mouse+right button) or pressing
Ctrl+D (Redraw Screen) after running the script now solves the
problem. In the old script below dragging or Ctrl+D didn't solve the
problem.<br>
But I found no solution that the script itself delivers the right
output.<br>
<br>
Even if I put<br>
<font face="Courier New, Courier, monospace">finenv.UI():RedrawDocument()<br>
</font>at the end of the script, it doesn't change anything. The
percussion noteheads still looked messed up.<br>
Is there a difference between <font face="Courier New, Courier,
monospace">finenv.UI():RedrawDocument()</font>at the end of the
script and pressing Ctrl+D after running the plug-in ?<br>
Would it be possible to add the menu command MENUCMD_REDRAWDOCUMENT
to achieve the same behaviour ?<br>
Attached is another screenshot of how the percussion noteheads that
were changed from asci coding to SMuFl look right after running the
plug-in and then (correct) after pressing Ctrl-D.<br>
<br>
Jan<span style="color: rgb(0, 0, 0); font-family: Roboto,
sans-serif; font-size: 14px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
22px; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255, 255);"><br>
</span><br>
<div class="moz-cite-prefix">Am 02.04.2015 um 19:28 schrieb Jan
Angermüller:<br>
</div>
<blockquote cite="mid:551D7C4C.2060907@angermueller.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
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"><a class="moz-txt-link-freetext" href="http://youtu.be/_Oo4fLq7qiE">http://youtu.be/_Oo4fLq7qiE</a></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 <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
</body>
</html>