<div dir="ltr"><div><div><div>Hello Jari,<br><br></div>I know you're very busy but this thing is driving me crazy while it must be very simple.<br></div>I try to get a pagebreak after a final barline:<br><br>local region = finale.FCMusicRegion()<br>
region:SetCurrentSelection()<br>selectedmeasures = finale.FCMeasures()<br>selectedmeasures:LoadRegion(region)<br><br><br>for measure in each(selectedmeasures) do<br> if measure.Barline == finale.BARLINE_FINAL<br> then<br>
print ("Double barline found in measure ", measure.ItemNo)<br> local m = finale.FCMeasure(measure.ItemNo +1)<br> --m:Load()<br> m.PageBreak = true<br>
m:Save()<br> end<br>end<br>selectedmeasures:SaveAll()<br><br></div>What am I doing wrong here?<br><div class="gmail_extra"><br clear="all"><div><div>Kind regards,<br></div><div>Herbert<br></div>
</div>
<br><br><div class="gmail_quote">2013/11/5 Herbert van Essen <span dir="ltr"><<a href="mailto:hpvanessen@gmail.com" target="_blank">hpvanessen@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div>Hello Jari,<br><br></div>I tried also the "nextsystem.BottomMargin ="<br></div>It differs from the actual setting a factor 96!<br></div>And the "nextsystem.RightMargin =" is working very strange.<br>
</div>Is this not working or am I missing something?<br><div><br></div><div class="gmail_extra">Kind regards,<br><br></div><div class="gmail_extra">Herbert<br></div><div><div class="h5"><div class="gmail_extra"><div class="gmail_quote">
2013/10/30 Jari Williamsson <span dir="ltr"><<a href="mailto:jari.williamsson@mailbox.swipnet.se" target="_blank">jari.williamsson@mailbox.swipnet.se</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Herbert,<br>
<br>
I would do something like this. The "systems" collection loaded at the start is for reference only - it's used to find out if a measure belongs to a system. If measures are rearranged across systems during the measure loop, that reference collection needs to be reloaded.<br>
<br>
---<br>
finale.FCStaffSystems.<u></u>UpdateFullLayout()<br>
systems = finale.FCStaffSystems()<br>
systems:LoadAll()<div><br>
<br>
allmeasures = finale.FCMeasures()<br>
allmeasures:LoadAll()<br>
for measure in each(allmeasures) do<br>
if measure.Barline == finale.BARLINE_DOUBLE then<br>
print ("Double barline found in measure ", measure.ItemNo)<br></div>
for ss in each(systems) do<br>
if ss:ContainsMeasure(measure.<u></u>ItemNo) then<br>
local nextsystem = finale.FCStaffSystem()<br>
nextsystem:Load(ss.ItemNo + 1)<br>
nextsystem.TopMargin = (80)<br>
nextsystem.LeftMargin = (40)<br>
nextsystem:Save()<br>
end<br>
end<br>
end<br>
end<br>
---<br>
<br>
Best regards,<br>
<br>
Jari Williamsson<div><div><br>
<br>
On 2013-10-30 14:56, Herbert van Essen wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<br>
Hi Jari et al,<br>
<br>
I try to change the left and top margins of a system after the measure<br>
that has a double barline.<br>
How should I load the right system after the measure with the double<br>
barline?<br>
<br>
<br>
allmeasures = finale.FCMeasures()<br>
allmeasures:LoadAll()<br>
for measure in each(allmeasures) do<br>
if measure.Barline == finale.BARLINE_DOUBLE then<br>
print ("Double barline found in measure ", measure.ItemNo)<br>
local ss = finale.FCStaffSystem()<br>
ss:Load(measure + 1)<br>
ss.TopMargin = (80)<br>
ss.LeftMargin = (40)<br>
ss:Save()<br>
end<br>
<br>
finale.FCStaffSystems.<u></u>UpdateFullLayout()<br>
end<br>
<br>
Thanks very much!<br>
<br>
Herbert<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/<u></u>listinfo/jwlua_jwmusic.nu</a><br>
<br>
</blockquote>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/<u></u>listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>