[JW Lua] Change System Margins after Double barline

Herbert van Essen hpvanessen at gmail.com
Wed Oct 30 17:09:49 CET 2013


Jari,

Thank you very much!
I will try that this evening.

Kind regards,

Herbert
Op 30 okt. 2013 16:27 schreef "Jari Williamsson" <
jari.williamsson at mailbox.swipnet.se>:

> Herbert,
>
> 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.
>
> ---
> finale.FCStaffSystems.**UpdateFullLayout()
> systems = finale.FCStaffSystems()
> systems:LoadAll()
>
> allmeasures = finale.FCMeasures()
> allmeasures:LoadAll()
> for measure in each(allmeasures) do
>     if measure.Barline == finale.BARLINE_DOUBLE then
>        print ("Double barline found in measure ", measure.ItemNo)
>         for ss in each(systems) do
>             if ss:ContainsMeasure(measure.**ItemNo) then
>                 local nextsystem = finale.FCStaffSystem()
>                 nextsystem:Load(ss.ItemNo + 1)
>                 nextsystem.TopMargin = (80)
>                 nextsystem.LeftMargin = (40)
>                 nextsystem:Save()
>             end
>         end
>     end
> end
> ---
>
> Best regards,
>
> Jari Williamsson
>
> On 2013-10-30 14:56, Herbert van Essen wrote:
>
>>
>> Hi Jari et al,
>>
>> I try to change the left and top margins of a system after the measure
>> that has a double barline.
>> How should I load the right system after the measure with the double
>> barline?
>>
>>
>> allmeasures = finale.FCMeasures()
>> allmeasures:LoadAll()
>> for measure in each(allmeasures) do
>>      if measure.Barline == finale.BARLINE_DOUBLE then
>>         print ("Double barline found in measure ", measure.ItemNo)
>>         local ss = finale.FCStaffSystem()
>>          ss:Load(measure + 1)
>>          ss.TopMargin = (80)
>>          ss.LeftMargin = (40)
>>          ss:Save()
>> end
>>
>> finale.FCStaffSystems.**UpdateFullLayout()
>> end
>>
>> Thanks very much!
>>
>> Herbert
>>
>>
>> ______________________________**_________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/**listinfo/jwlua_jwmusic.nu<http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu>
>>
>>
>
>
> ______________________________**_________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/**listinfo/jwlua_jwmusic.nu<http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20131030/0a3a77bd/attachment-0002.html>


More information about the JWLua mailing list