[JW Lua] FCEntryMetrics dependent on the selected layer even if all layers are visible

Jan Angermüller jan at angermueller.com
Mon Mar 19 16:34:04 CET 2018


Jari,

I noticed a weird behaviour with the entry metrics:
The FCEntryMetrics can be dependent on the selected layer, even if all 
layers are visible.
Attached is the test document.
It has to do with consolidated rests - in the example the third note 
entry (the last triplet rest).

Test code:
for e in eachentry(finenv.Region()) do
     local entrymetrics=finale.FCEntryMetrics()
     entrymetrics:Load(e)
     if e.MeasurePos==683 then --look at the last rest from the tuplet
         print(entrymetrics.StemRightPosition,e.LayerNumber)
     end
end

If layer 1, 3 or 4 is selected (but layer 2 visible as well), the script 
returns:
Running [Unnamed Script] ======>
*640 1   --! is 617 if layer 2 is selected*
617 2
<======= [Unnamed Script] succeeded (Processing time: 0.009 s).
Looks like this in Finale:


If layer 2 is selected (but layer 1, 3 and 4 visible as well), the 
script returns:
Running [Unnamed Script] ======>
617 1
616 2
<======= [Unnamed Script] succeeded (Processing time: 0.009 s).
Looks like this in Finale:


In other words both look and print, of course, identical in Finale, the 
only difference is that if there is a consolidated rest, Finale will 
highlight the rest in the color of the current layer. But this seems to 
affect the metrics calculation as well.

Is there workaround?
I haven't compared all entry metrics values yet. There may be a 
workaround for this. I don't know.
Probably it would be best if you could add the "Current Active Layer" 
value to FCMiscDocPrefs which, AFAIK, isn't available at that moment. Or 
have I overlooked it?

Best,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180319/4854dc3f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kjkckblonncafbic.jpg
Type: image/jpeg
Size: 8519 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180319/4854dc3f/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nicokgepijlncbpb.jpg
Type: image/jpeg
Size: 8436 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180319/4854dc3f/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testdoc consolidated rests.musx
Type: application/octet-stream
Size: 45298 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180319/4854dc3f/attachment-0001.obj>


More information about the JWLua mailing list