<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Jari, <br>
<br>
here is a bit more info on that one.<br>
When I print the "Distance" of the system staves (multiplied with
the page percentage), I get this list (test script at the bottom): <br>
<br>
0<br>
183.6<br>
403.8<br>
624<br>
904.8<br>
1125<br>
1344.6<br>
1564.8<br>
...<br>
3970.2<br>
4148.4<br>
4324.8 (expected height of staff system)<br>
-1455.6 (!!!!)<br>
<br>
It looks fine until the very last value. That comes from a<b> hidden
staff </b>(after the double basses) which seems to be taken into
account for CalcHeight, although it's set to "Cutaway". <br>
So probably a JW Lua problem indeed. <br>
<br>
Best,<br>
Jan<br>
<br>
<br>
<br>
<br>
local staffsystemslookup=finale.FCStaffSystemsLookup ()<br>
local staffsystems = staffsystemslookup:GetCurrentPartStaffSystems
()<br>
for s in each(staffsystems) do<br>
print(s:CalcHeight(false),s:CalcHeight(true),s.TopMargin,s.UseStaffResize,s.Resize,s.StaffHeight/64)<br>
local sysstaves=s:CreateSystemStaves()<br>
for ss in each(sysstaves) do<br>
print(ss.Distance*0.6)<br>
end<br>
end<br>
<br>
<div class="moz-cite-prefix">Am 03.08.2017 um 10:58 schrieb Jan
Angermüller:<br>
</div>
<blockquote type="cite"
cite="mid:855bc6d0-23da-05d5-4d26-4faaa868e08e@angermueller.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
Jari,<br>
<br>
I sometimes get weird results in staff height calculations when
changing staff distances through JW Lua:<br>
<br>
The score / staff distances looks fine on the screen after the
change, but when I call FCStaffSystem:CalcHeight afterwards it
returns wrong values, even negative staff system heights!<br>
<br>
Test script below and test score attached. The test score has a
page height of 4761 EVPU and a staff system slightly smaller, so
one would expect a staff height of approximately 4200 EVPU.<br>
<b>But JW Lua calculates -2156EVPU (minus!).</b><br>
The score is a first page excerpt of a large orchestra score
created in 2014.5. For file size reasons I attached in the Fin2012
format - the problem remains.<br>
<br>
I tested with JW Lua 0.49/Windows/2014.5, but the problem is older
and also occured in 0.45.<br>
<br>
Best,<br>
Jan<br>
<br>
local staffsystemslookup=finale.FCStaffSystemsLookup ()<br>
local staffsystems = staffsystemslookup:GetCurrentPartStaffSystems
()<br>
for s in each(staffsystems) do<br>
print(s:CalcHeight(false),s:CalcHeight(true),s.TopMargin,s.UseStaffResize,s.Resize,s.StaffHeight/64)<br>
end<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
</body>
</html>