allmeasures = finale.FCMeasures()allmeasures:LoadAll()lastmeasure = finale.FCMeasure()for measure in each(allmeasures) do if measure.ItemNo > 1 then if not measure.TimeSignature:IsIdentical(lastmeasure.TimeSignature) or not measure.KeySignature:IsIdentical(lastmeasure.KeySignature) then lastmeasure.Barline = finale.BARLINE_DOUBLE lastmeasure:Save() end end lastmeasure = measureend

GetTimeSignature() and IsIdentical() are method calls and should be preceeded with a ':'

This version should work:

local allmeasures = finale.FCMeasures()allmeasures:LoadAll()lastmeasure = finale.FCMeasure()for measure in each(allmeasures) do if measure.ItemNo > 1 then if not measure.TimeSignature:IsIdentical(lastmeasure.TimeSignature) or not measure.KeySignature:IsIdentical(lastmeasure.KeySignature) then lastmeasure.Barline = finale.BARLINE_DOUBLE lastmeasure:Save() end end lastmeasure = measureend

D-oh! I just needed the latest JW Lua. Since JW Plug-in Manager doesn't manage it I had never updated it. Thanks for your help and sorry for the false alarm. I am excited to be learning this and predict great things to be gained.

Is there access to the displayed time signature, by the way? Since I rarely use that, it's no big deal if not, but ideally these double barlines are based on what the player sees, not the underlying Finale time signatures. Conceivably, one could have a split measure or something.

Motet said...Is there access to the displayed time signature, by the way? Since I rarely use that, it's no big deal if not, but ideally these double barlines are based on what the player sees, not the underlying Finale time signatures. Conceivably, one could have a split measure or something.

Looks like FCNote:GetString() doesn't observe "simplify key" in the transposition. For example, in the concert key of F# major, the Bb Clarinet's key signature would be Ab major, and GetString() returns "E#" for a written F. Any work-around?

(If you would prefer I take my questions to the mailing list, I'm happy to do so.)