[JW Lua] FCMeasureNumberRegion alignments not changing

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Mon May 4 22:50:10 CEST 2015


Joseph,

Charles is correct. Always try to use the constant names (the constants 
are prefixed with "finale.") even if you know what the number is.

Perhaps you missed the listconstants.lua script which I put on the list 
in the distant past? I now put that script on the tips site:
http://finaletips.nu/index.php/download/category/31-jw-lua-scripts

The documentation should tell what constant prefix you should search for 
(such as "MNJUSTIFY_").


Best regards,

Jari Williamsson


On 2015-05-04 18:39, Charles O. Lawrence wrote:
> Why not use the defined constants instead of hardwiring numbers?  Here
> are the current values:
>
> MNALIGN_CENTER = 1
>
> MNALIGN_LEFT = 0
>
> MNALIGN_RIGHT = 2
>
> MNJUSTIFY_CENTER = 2
>
> MNJUSTIFY_LEFT = 0
>
> MNJUSTIFY_RIGHT = 1
>
> Use them like this:
>
> region:SetStartAlignment(finale.MNALIGN_LEFT)
>
> They may not be correct.  Jari can verify that.
>
> Charles Lawrence
>
> *From:*JWLua [mailto:jwlua-bounces at jwmusic.nu] *On Behalf Of *Joseph
> Weidinger
> *Sent:* Monday, May 4, 2015 9:55 AM
> *To:* Jw Lua Mailing List
> *Subject:* [JW Lua] FCMeasureNumberRegion alignments not changing
>
> I am making a script that makes new measure number regions.  It was
> going great until I started to change the position with:
>
> SetStartAlignment()
>
> SetStartJustification()
>
> SetMultiMeasureAlignment()
>
> SetMultiMeasureJustification()
>
> The documentation seems weird to me (
> http://www.finaletips.nu/frameworkref/group__lua__classes.html#ga934c898f4ebbf7cbca683e424c641462
> ).  I gathered it needed a number argument and based on a table I saw in
> your PDK, it looks like 0 should be Left, 1 should be Center, 2 should
> be Right.  However, the actual order is not Left Center Right but Left
> Right Center. Furthermore, passing these numbers into
> SetStartAlignment() and SetMuliMeasureAlignment() don't affect it at
> all. It simply defaults to Left every time.
>
> Another way of seeing it based on my experiments:
>
> start
>
> 0 0 left left
>
> 1 1 left right
>
> 2 2 left center
>
> multimeasure
>
> 0 0 left left
>
> 1 1 left right
>
> 2 2 left center
>
> So to summarize, it seems no number passed into SetStartAlignment or
> SetMultiMeasureAlignment (and presumably SetMultipleAlignment) changes
> the value to anything other than left.  Am I missing something...?
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>






More information about the JWLua mailing list