<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Jari,<br>
<br>
there seems to be a bug when swapping layers via FCNoteEntryLayer,
if one layer is empty and there is a "next" measure that has notes
on both swapped layers. Then the last rest in the swapped layer <u>disappears
</u>during the next eachentrysaved-call.<br>
<br>
Attached is the test document for the script below which was created
directly from the default document (so no messed up files problem).<br>
The last rest in measure 1 disappears when I run the script - only
when I remove the rest in m.3 it doesn't disappear:<br>
<a class="moz-txt-link-freetext" href="https://youtu.be/SAg4ueohNaw">https://youtu.be/SAg4ueohNaw</a><br>
It wouldn't disappear either, if measure 1 had notes on layer 1.<br>
<br>
No real workaround for this so far.<br>
<br>
Any news on planned JW Lua updates?<br>
<br>
Best,<br>
Jan<br>
<br>
<br>
local region=finale.FCMusicRegion()<br>
region:SetFullDocument()<br>
<br>
local noteentrylayer = finale.FCNoteEntryLayer(1,1,1,1)<br>
noteentrylayer:Load()<br>
noteentrylayer.LayerIndex=0<br>
<br>
local noteentrylayer2 = finale.FCNoteEntryLayer(0,1,1,1)<br>
noteentrylayer2:Load()<br>
noteentrylayer2.LayerIndex=1<br>
noteentrylayer:Save()<br>
--noteentrylayer2:Save()<br>
<br>
for e in eachentrysaved(region) do --should do nothing, but actually
the rest disappears after this call<br>
end<br>
</body>
</html>