<div dir="ltr">Thanks. I didn't know about the finale. prefix but I do now...  Even still however, MN_ALIGN_CENTER doesn't seem to do anything even if I put a 1 in there.  Run this script (which changes to a score-style measuring system). The alignment should read "center" on all the measure number position boxes, but they don't, at least for me.<div><br></div><div><div>-- delete existing regions</div><div>local mNumRegions = finale.FCMeasureNumberRegions()</div><div>mNumRegions:LoadAll()</div><div>for m in eachbackwards(mNumRegions) do</div><div>   m:DeepDeleteData()</div><div>end</div><div><br></div><div>--------------------- 1 - displayed region ------------------------------</div><div>-- establish font info for displayed measure numbers</div><div>local multipleFontInfo = finale.FCFontInfo()</div><div>multipleFontInfo.Bold = true</div><div>multipleFontInfo.Name = "Times New Roman"</div><div>multipleFontInfo.Size = 22</div><div><br></div><div>local multiAndMultiMeasureFontInfo = finale.FCFontInfo()</div><div>multiAndMultiMeasureFontInfo.Italic = true</div><div>multiAndMultiMeasureFontInfo.Name = "Times New Roman"</div><div>multiAndMultiMeasureFontInfo.Size = 10</div><div><br></div><div>newRegion = finale.FCMeasureNumberRegion()</div><div>if newRegion then</div><div><br></div><div>   -- basics</div><div>   newRegion.StartMeasure = 1</div><div>   newRegion.EndMeasure = 999</div><div>   newRegion.UseScoreInfoForParts = false</div><div><br></div><div>   -- SCORE --</div><div>   newRegion:SetExcludeOtherStaves(true)</div><div>   newRegion:SetShowOnBottomStaff(true)</div><div>   newRegion:SetShowOnMultiMeasureRests(true)</div><div>   newRegion:SetShowMultiples(true)</div><div>   -- multiple font info and position</div><div>   newRegion:SetMultipleFontInfo(multipleFontInfo)</div><div>   newRegion:SetMultipleAlignment(finale.MNALIGN_CENTER) --- BROKEN>>>??</div><div>   newRegion:SetMultipleJustification(finale.MNJUSTIFY_CENTER)</div><div>   newRegion:SetMultipleHorizontalPosition(0)</div><div>   newRegion:SetMultipleVerticalPosition(-270)</div><div><br></div><div>   -- LINKED PARTS --</div><div>   newRegion:SetExcludeOtherStaves(true, true)</div><div>   newRegion:SetShowOnTopStaff(true, true)</div><div>   newRegion:SetShowMultiples(true, true)</div><div>   newRegion:SetShowMultiMeasureRange(true, true)</div><div>   -- multiple font info and position for parts</div><div>   newRegion:SetMultipleFontInfo(multiAndMultiMeasureFontInfo, true)</div><div>   newRegion:SetMultipleAlignment(finale.MNALIGN_CENTER, true) --- BROKEN>>>??</div><div>   newRegion:SetMultipleJustification(finale.MNJUSTIFY_CENTER, true)</div><div>   newRegion:SetMultipleHorizontalPosition(0, true)</div><div>   newRegion:SetMultipleVerticalPosition(-175, true)</div><div>   -- multimeasure font info and position for parts</div><div>   newRegion:SetMultiMeasureFontInfo(multiAndMultiMeasureFontInfo, true)</div><div>   newRegion:SetMultiMeasureAlignment(finale.MNALIGN_CENTER, true) --- BROKEN>>>??</div><div>   newRegion:SetMultiMeasureJustification(finale.MNJUSTIFY_CENTER, true)</div><div>   newRegion:SetMultiMeasureHorizontalPosition(0, true)</div><div>   newRegion:SetMultiMeasureVerticalPosition(-175, true)</div><div>   newRegion:SaveNew()</div><div>end</div><div><br></div><div>--------------------- 2 - hidden region ------------------------------</div><div><br></div><div>-- establish font info for hidden measure numbers</div><div>local hiddenFontInfo = finale.FCFontInfo()</div><div>hiddenFontInfo.Bold = true</div><div>hiddenFontInfo.Name = "Times New Roman"</div><div>hiddenFontInfo.Size = 22</div><div>hiddenFontInfo.Hidden = true</div><div><br></div><div>newHiddenRegion = finale.FCMeasureNumberRegion()</div><div>if newHiddenRegion then</div><div>   newHiddenRegion.StartMeasure = 1</div><div>   newHiddenRegion.EndMeasure = 999</div><div>   newHiddenRegion.UseScoreInfoForParts = false</div><div><br></div><div>   newHiddenRegion:SetShowOnMultiMeasureRests(true)</div><div>   newHiddenRegion:SetShowMultiples(true)</div><div><br></div><div>   -- multiple font info and position</div><div>   newHiddenRegion:SetMultipleFontInfo(hiddenFontInfo)</div><div>   newHiddenRegion:SetMultipleAlignment(finale.MNALIGN_CENTER) --- BROKEN>>>??</div><div>   newHiddenRegion:SetMultipleJustification(finale.MNJUSTIFY_CENTER)</div><div>   newHiddenRegion:SetMultipleHorizontalPosition(0)</div><div>   newHiddenRegion:SetMultipleVerticalPosition(-270)</div><div>   </div><div>   newHiddenRegion:SaveNew()</div><div>end</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 4, 2015 at 3:50 PM, Jari Williamsson <span dir="ltr"><<a href="mailto:jari.williamsson@mailbox.swipnet.se" target="_blank">jari.williamsson@mailbox.swipnet.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Joseph,<br>
<br>
Charles is correct. Always try to use the constant names (the constants are prefixed with "finale.") even if you know what the number is.<br>
<br>
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:<br>
<a href="http://finaletips.nu/index.php/download/category/31-jw-lua-scripts" target="_blank">http://finaletips.nu/index.php/download/category/31-jw-lua-scripts</a><br>
<br>
The documentation should tell what constant prefix you should search for (such as "MNJUSTIFY_").<br>
<br>
<br>
Best regards,<br>
<br>
Jari Williamsson<br>
<br>
<br>
On 2015-05-04 18:39, Charles O. Lawrence wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why not use the defined constants instead of hardwiring numbers?  Here<br>
are the current values:<br>
<br>
MNALIGN_CENTER = 1<br>
<br>
MNALIGN_LEFT = 0<br>
<br>
MNALIGN_RIGHT = 2<br>
<br>
MNJUSTIFY_CENTER = 2<br>
<br>
MNJUSTIFY_LEFT = 0<br>
<br>
MNJUSTIFY_RIGHT = 1<br>
<br>
Use them like this:<br>
<br>
region:SetStartAlignment(finale.MNALIGN_LEFT)<br>
<br>
They may not be correct.  Jari can verify that.<br>
<br>
Charles Lawrence<br>
<br>
*From:*JWLua [mailto:<a href="mailto:jwlua-bounces@jwmusic.nu" target="_blank">jwlua-bounces@jwmusic.nu</a>] *On Behalf Of *Joseph<br>
Weidinger<br>
*Sent:* Monday, May 4, 2015 9:55 AM<br>
*To:* Jw Lua Mailing List<br>
*Subject:* [JW Lua] FCMeasureNumberRegion alignments not changing<div><div class="h5"><br>
<br>
I am making a script that makes new measure number regions.  It was<br>
going great until I started to change the position with:<br>
<br>
SetStartAlignment()<br>
<br>
SetStartJustification()<br>
<br>
SetMultiMeasureAlignment()<br>
<br>
SetMultiMeasureJustification()<br>
<br>
The documentation seems weird to me (<br>
<a href="http://www.finaletips.nu/frameworkref/group__lua__classes.html#ga934c898f4ebbf7cbca683e424c641462" target="_blank">http://www.finaletips.nu/frameworkref/group__lua__classes.html#ga934c898f4ebbf7cbca683e424c641462</a><br>
).  I gathered it needed a number argument and based on a table I saw in<br>
your PDK, it looks like 0 should be Left, 1 should be Center, 2 should<br>
be Right.  However, the actual order is not Left Center Right but Left<br>
Right Center. Furthermore, passing these numbers into<br>
SetStartAlignment() and SetMuliMeasureAlignment() don't affect it at<br>
all. It simply defaults to Left every time.<br>
<br>
Another way of seeing it based on my experiments:<br>
<br>
start<br>
<br>
0 0 left left<br>
<br>
1 1 left right<br>
<br>
2 2 left center<br>
<br>
multimeasure<br>
<br>
0 0 left left<br>
<br>
1 1 left right<br>
<br>
2 2 left center<br>
<br>
So to summarize, it seems no number passed into SetStartAlignment or<br>
SetMultiMeasureAlignment (and presumably SetMultipleAlignment) changes<br>
the value to anything other than left.  Am I missing something...?<br>
<br>
<br>
<br></div></div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
<br>
</blockquote>
<br>
<br>
<br>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div><br></div>