[JW Lua] Deleting groups...

Robert Patterson robert at robertgpatterson.com
Sun Aug 22 20:50:15 CEST 2021


If you are trying to delete groups from multistaff instruments, don't.
Those groups are controlled by the Score Manager.

On Sun, Aug 22, 2021 at 1:11 PM Simon Leclerc <simon at prodsl.ca> wrote:

> It does work, Jan. Thank you!
>
> And you’re right to remind me of the backward approach when deleting.
> Important factor.
>
> I have another question regarding this:
>
> When the group is deleted, if I use the command “Reset all groups &
> Brackets”, the group re-appears.
> There must be a class somewhere telling Finale that by defaut, those
> staves should be grouped.
> It does not seem to be part of the FCStaff class.
>
> Any idea which one?
>
>
>
> ¯\_(ツ)_/¯
>
> Simon Leclerc
>
>
>
>
>
> On August 22, 2021, at 13:15, Jan Angermüller <jan at angermueller.com>
> wrote:
>
> When deleting from a collection class always use eachbackwards() instead
> of each() and never save the collection afterwards.
> This code should work:
>
> if finenv.FinaleVersion >= 2011 then
>
>   groups = finale.FCGroups(0, 0)
>   groups:LoadAll()
>
>   for g in each*backwards*(groups) do
>
>     if g:GetItemID() == 18 then
>
>       g:DeleteData()
>
>     end
>   end
> end
>
>
>
> Jan
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20210822/0080e4a2/attachment.htm>


More information about the JWLua mailing list