<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Robert,<br>
<br>
I have noticed several times that undo-ing and re-doing a JW Lua
plug-in can change the measure width.<br>
Finally, I have created a short reproduceable demo that I can't
explain.<br>
<br>
The script is below.<br>
When applied to the score of the attached Finale file, it switches
to linked part 3, loads measure 1 and changes its measure width to
360 and then returns to the score.<br>
The measure width in the score remains unchanged. So far, everything
ok.<br>
Then I undo the plug-in in Finale and click on Edit->Redo ...<br>
Now the width in measure 1 also changes in the score!<br>
<br>
Here is a video that shows the effect (with a slightly different
version of the score):<br>
<a class="moz-txt-link-freetext" href="https://www.youtube.com/watch?v=lPJd3sq9zQg">https://www.youtube.com/watch?v=lPJd3sq9zQg</a><br>
<br>
In Perfect Layout it makes Finale's Undo-/Redo feature unusuable,
because it (nearly) always changes the measure widths in the score
for an unknown reason.<br>
Do you have an idea how I can prevent this?<br>
<br>
Jan<br>
<br>
--Show measure 1 width from score<br>
local meas=finale.FCMeasure(1)<br>
meas:Load(1)<br>
print("Measure Width in Score",meas.Width)<br>
<br>
--Load Part 3 and change<br>
local p=finale.FCPart(3)<br>
p:SwitchTo(); <br>
p:ViewInDocument()<br>
meas=finale.FCMeasure(1)<br>
meas:Load(1)<br>
print("Measure Width in Part ",p.ID,meas.Width)<br>
meas.Width=360<br>
meas:Save()<br>
print("Measure Width after change",meas.Width)<br>
p:SwitchBack(); <br>
<br>
--Go back to score and show measure 1 width<br>
p=finale.FCPart(0)<br>
p:ViewInDocument()<br>
meas=finale.FCMeasure(1)<br>
meas:Load(1)<br>
print("Measure Width in Score",meas.Width)<br>
</body>
</html>