[JW Lua] Slur segment does not return measure pos
Jan Angermüller
jan at angermueller.com
Tue Jul 15 22:04:22 CEST 2014
Jari,
if I create an FCSmartShapeSegment from an FCSmartShape that is a slur
(IsSlur() == true),
then MeasurePos from FCSmartShapeSegment returns a strange result which
is not
the MeasurePos.
It seems to me like an entry or identification number is returned instead.
The difference between the left and the right measure pos is usually the
number of note entries below the slur.
Try this script on a selected measure with a slur:
local marks = finale.FCSmartShapeMeasureMarks()
marks:LoadAllForRegion( finenv.Region(), true)
for mark in each(marks) do
local smartshape = mark:CreateSmartShape()
if (smartshape ~= nil) then
local leftseg = smartshape:GetTerminateSegmentLeft()
local rightseg = smartshape:GetTerminateSegmentRight()
print("Left MeasurePos",leftseg.MeasurePos)
print("Right MeasurePos",rightseg.MeasurePos)
end
end
It should return for example 0 and 4096 in a 4/4 measure with
one big slur over all notes, but it returns something like 24123 and 24126.
For smartshape hairpins the left/right measure pos are ok.
It's only the slurs that have this problem.
Jan
More information about the JWLua
mailing list