<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jari,<br>
<br>
below is a function that copies note entries within a partial
measure<br>
from layer x to layer y. It works fine so far - even with tuplets. <br>
<br>
But I don't understand what influence the "copytuplets" parameter <br>
has in FCNoteEntry:CopyEntryDetails.<br>
If I set it to true (and there are tuplets in the measure), it still<br>
creates no tuplet information, and even the IsPartOfTuplet()<br>
returns false while in the original note entries it returns true.<br>
<br>
The tuplet information is created afterwards with CloneTuplets<br>
(and works fine).<br>
So I think the "copytuplets" parameter currently has no effect.<br>
<br>
Best regards,<br>
Jan<br>
<br>
function
CopyNotesFromPartialMeasureLayerToLayer(sourcelayer,destlayer,sourcestaff,deststaff,measure,startmeasurepos,endmeasurepos)<br>
local
sourceentrylayer=finale.FCNoteEntryLayer(sourcelayer-1,sourcestaff,measure,measure)<br>
sourceentrylayer:Load()<br>
local
destentrylayer=finale.FCNoteEntryLayer(destlayer-1,deststaff,measure,measure)<br>
destentrylayer:Load()<br>
local lastentry=NULL<br>
for e in each(sourceentrylayer) do<br>
if (e.MeasurePos>=startmeasurepos)<br>
and (e.MeasurePos<=endmeasurepos) then<br>
e2=destentrylayer:InsertEntriesAfter(lastentry,1,false)<br>
e2:CopyNotes(e)<br>
e2:CopyEntry(e)<br>
e2:CopyEntryDetails(e,true)<br>
print(e2:IsPartOfTuplet(),e:IsPartOfTuplet())<br>
e2.Legality=true<br>
lastentry=e2<br>
end<br>
end<br>
destentrylayer:Save()<br>
destentrylayer:CloneTuplets(sourceentrylayer)<br>
destentrylayer:Save()<br>
end<br>
<br>
CopyNotesFromPartialMeasureLayerToLayer(1,3,1,1,1,0,2047) --copies
first two quarter notes in staff 1 measure 1 from layer 1 to layer 3<br>
<br>
Running [Unnamed Script] ======><br>
false false<br>
false true <b> (here a tuplet starts in the original lay</b><b>er !)</b><br>
false true<br>
false true<br>
false false<br>
<======= [Unnamed Script] succeeded (Processing time: 0.008 s).<br>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>