[JW Lua] Problem with the new FCSmartShapeEntryConnectStyle: only first image updated and not affecting the slurs
Jan Angermüller
jan at angermueller.com
Sat Jun 3 12:18:52 CEST 2023
Robert,
I was just playing a bit the new FCSmartShapeEntryConnectStyle-stuff as
I received an old Finale score where the slur placement wasn't setup yet
(all values set to 0).
I don't know what Finale version this score was created in, probably in
Finale v1 or v2.
The user wrote that he has been using Finale since v1.0.
The file info lists creation date and application as "unknown".
However, the score was imported into Finale 27 and sent to me as a
Finale 27 document.
When I run the script below in Finale 27, the default slur placement
settings are correctly written into the slur placement dialog.
However, the preview images in the slur placement dialog are not updated
- except for the very first image (slur above downstem notes).
And when I attach a new slur it still uses the old 0,0 values instead of
the values written.
It seems like only the images of the first dialog are updated (slur
above downstem notes) and only the first four values are actually used
from Finale - although all other values look fine in the Slur Placement
dialog.
Could it be that there is something missing in your code that actually
writes the new values (after value 1-4) more deeply into Finale?
Below is my test code.
For trying to track down the problem I have reloaded the
FCSmartShapePrefs for each value pair and immediately saved it.
But it's the same result when I load it only once and save it after the
loop.
Attached is the file excerpt and here is a screencam video that shows
the problem:
https://www.youtube.com/watch?v=LPa0LeALXCs
I have tested it both with RGP Lua v0.66 and v0.67. Same result.
Any ideas?
local defvalues=
{0,12,0,12,
12,-24,-12,-24,
0,-12,0,-12,
12,24,-12,24,
12,-24,-12,-24,
6,4,-12,-48,
8,0,-6,48,
0,-3,-24,-3,
0,3,0,9,
0,12,0,12,
0,-12,0,-12,
24,-24,
24,-24,
24,24,
0,8,0,8,
0,-8,0,-8}
local numentr=29
local index=1
local i
for i=1,numentr do
local prefs=finale.FCSmartShapePrefs()
prefs:LoadFirst()
local a
=prefs:CreateEntryConnectStyle(finale.SSENTCNCTSTYLETYPE_SLURS,i-1)
if a then
a:SetHorizontalOffset(defvalues[index])
a:SetVerticalOffset(defvalues[index+1])
prefs:SaveEntryConnectStyle(a,finale.SSENTCNCTSTYLETYPE_SLURS,i-1 )
prefs:Save()
end
index=index+2
end
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20230603/40bdba1c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slur placement problem.musx
Type: application/octet-stream
Size: 62542 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20230603/40bdba1c/attachment-0001.obj>
More information about the JWLua
mailing list