[JW Lua] Copying Percussion Layouts
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Tue Apr 1 10:22:09 CEST 2014
Jan,
I think the issue is that the name of the new percussion map isn't
saved. I need to add a method to save that name.
Btw, the LoadAllForItem() in your example is not necessary, since the
SaveDataAs() method copies without relying on existing data.
Best regards,
Jari Williamsson
On 2014-03-28 19:52, Jan Angermüller wrote:
> Jari,
>
> is it possible to clone or create new percussion layouts from within Lua ?
>
> I was successful in copying a percussion layout to an existing
> percussion layout
> (overwriting the existing note type entries). The copied entries were
> available in the percussion layout designer.
>
> I was also successful in copying a percussion layout to a new cmper and
> reading it from within Lua.
> But: when I opened the "Percussion Layout Designer" dialog there were no
> new entries.
> Do I have to call a "flush" that the percussion layout entries are
> updated ?
>
> This is the code:
>
> local PercLayout=finale.FCPercussionLayoutNotes()
> PercLayout:LoadAllForItem(4) --loads layout 4
> PercLayout:SaveDataAs(4,9) -- writes to layout 9
>
> If layout 9 exists, its entries will be overwritten and are available in
> the layout designer
> If it doesn't exist, the entries are copied, but are non-existent when
> opening the layout designer,
> although they can be read within Lua.
>
> Changing the name of the new percussion layout (SetNameString) would
> also be required.
>
> Jan
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
More information about the JWLua
mailing list