[JW Lua] Reading measures from parts

Charles O. Lawrence charlesolawrence at bellsouth.net
Thu May 15 21:33:14 CEST 2014


Jan

I haven't tried it, but maybe you should use SetCurrent() instead of
SwitchTo().  I think switching only sets the focus.

Charles Lawrence

-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jan Angermüller
Sent: Thursday, May 15, 2014 12:17 PM
To: The JW Lua script plug-in.
Subject: [JW Lua] Reading measures from parts

Jari,

I was trying to read the part-specific measure attribute for the music
spacing issue discussed on Facebook.
Time signature based music spacing in slash style measures works fine now,
but only in the score not in the parts.

How do I get to the part measures ? I always get the measures from the score
only.
Probably I need to tell FCMeasure that we are in a certain part, but I
though part:SwitchTo() would do that.

local parts = finale.FCParts()
parts:LoadAll()
for p in each(parts) do
     p:SwitchTo()
     if p:IsPart() then     -- check that it's actually a part, and not 
the score
            local measure=finale.FCMeasure()
            measure:Load(1)    -- should load measure 1 from the part, 
but actually loads it from the score
            ....
     end
end

Any hints ?

Jan

_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





More information about the JWLua mailing list