[JW Lua] SetCustomOffset resets manually adjusted slur offset

Jan Angermüller jan at angermueller.com
Tue Feb 14 16:40:50 CET 2017


Jari,

when I have a slur where an endpoint has been _manually _adjusted (e.g. 
shifted a bit up) and then I call SetCustomOffset with any value (!), it 
always "removes" the offset (i.e. the offset value is still in memory, 
but the slur is set to not use the custom offset).

Maybe this video and script below helps solving the very old 
SetCustomOffset issue first mentioned in our email conversation from 
2014/7/20.

Screencam video: https://youtu.be/iDnkV6AMsRg
I create a slur, adjust the left position and run the script below: once 
with SetCustomOffset set to false and once with true. Both times the 
manual offset of the slur disappears. So it seems to be impossible to 
set a custom offset for slurs with JW Lua. According to the online 
documentation I would have expected when calling SetCustomOffset(false)  
- as it is a left shape segment - that the custom offset would have 
remained visible.

Script:
local marks=finale.FCSmartShapeMeasureMarks()
marks:LoadAll()
for m in each(marks) do
     local s=m:CreateSmartShape()
     if s:IsSlur() then
         local left=s:GetTerminateSegmentLeft()
         left:SetCustomOffset(false)
         s:Save()
     end
end

Best,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20170214/d4f78809/attachment.htm>


More information about the JWLua mailing list