[JW Lua] Insert Measures

Charles O. Lawrence charlesolawrence at bellsouth.net
Wed Mar 18 19:06:02 CET 2015


Jari,

This code seems to work to insert 2 measures beginning at measure 5 and then
move all the measure attributes downstream by 2.  Is there a better way?

--------------------------------------------
local mC = 2
local mS = 5

local measures = finale.FCMeasures()

measures:LoadAll()
print ("Before Number of measures",measures.Count)

finale.FCMeasures.Insert(mS,mC,true)

measures:LoadAll()
print ("After Number of measures",measures.Count)

local measure = finale.FCMeasure()

for m = mS,measures.Count-mC do
    measure:Load(m)
    measure:SaveAs(m+mC)
end

measures:SaveAll()
---------------------------------------------------------

It is easy to forget that note entry storage is completely different than
the measure data storage.

Thanks,
Charles





-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Charles O.
Lawrence
Sent: Wednesday, March 18, 2015 11:55 AM
To: 'The JW Lua script plug-in.'
Subject: Re: [JW Lua] Insert Measures

Thanks Jari,

Could you clarify the order of things with a code sample.  Thanks

Charles

 

-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Wednesday, March 18, 2015 11:37 AM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Insert Measures

Charles,

Measure attributes are not moved, and I don't think I'll change that design.
You should be able to read the measures prior to the insert, and then use
SaveAs() for the measures attributes you want to move.


Best regards,

Jari Williamsson


On 2015-03-11 16:20, Charles O. Lawrence wrote:
> Jari,
>
> When I try to insert measures with this code:
>
> finale.FCMeasures.Insert(12, 5,true) -- Inserts 5 measures at measure
> #12 and updates layout
>
> it inserts the measures OK and pushes the notes and clefs downstream, 
> but things like time signatures and key signatures remain in their 
> original measures.  Am I missing something or is this an error.
>
>
> Thanks,
> Charles
>
> _______________________________________________
> JWLua mailing list
> JWLua at 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
>
>



_______________________________________________
JWLua mailing list
JWLua at 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





More information about the JWLua mailing list