[JW Lua] Setting FCStaff:IndependentKeySig does not work
Jan Angermüller
jan at angermueller.com
Thu Jan 29 16:18:27 CET 2015
Jari,
if I create a new staff with JW Lua and set IndependentKeySig=true,
then the created staff will have the option "Independent Elements -> Key
Signature" selected,
BUT when I change the key in some measures on this staff it will affect
the whole score,
not this staff only as it should.
If I de-select the option in the staff settings, click on ok, go back to
the staff settings and re-select it,
it will then work fine, if I change the key signature somewhere on that
staff.
It seems to me that although the option "Independent Elements -> Key
Signature" is visually selected in the staff settings after running the
script, there must be a second flag beside FCStaff.IndependentKeySig
that needs to be set for the independent key signature to work. I tested
it with Finale 2014d / Windows 7 / JW Lua v0.29.
Below is the code to create the independent key signature staff.
Here is also a screencam video to demonstrate the above behaviour:
http://youtu.be/R3yCVG3Jc_U
All the best,
Jan
local staffID = finale.FCStaves.Append()
if staffID then
local staff=finale.FCStaff()
staff:Load(staffID)
staff.IndependentKeySig=true
staff:Save()
end
More information about the JWLua
mailing list