<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Jari et al,<br>
    <br>
    when calculating the metrics of a slur that goes over several staff
    systems, the metrics are only calculated correctly for the first
    staff system. <br>
    This was reported as a bug in 2014 (mail from 2014-06-28), but has
    never  been replied.<br>
    <br>
    <img src="cid:part1.86B11C53.ED2B1700@angermueller.com" alt=""><br>
    <br>
    The test script below returns these metric values for the slur start
    positions in measure 3 and 4.<br>
    <br>
    Running [Unnamed Script] ======><br>
    Measure: 3 Calculation ok? true X: 2020 Y: 2976<br>
    Measure: 4 Calculation ok? true X: 2020 Y: 2976    ---> wrong
    values, it's not from measure 3, but from measure 4.<br>
    <======= [Unnamed Script] succeeded (Processing time: 0.001 s).<br>
    <br>
    Has anybody found a workaround? <br>
    Or, Jari, have you had time to look in this issue? Is it a bug in
    the Finale PDK?<br>
    <br>
    Best,<br>
    Jan<br>
    <br>
    function GetEntryToSmartshape(id,measure,staff)<br>
        local notecell=finale.FCNoteEntryCell(measure,staff)<br>
        notecell:Load()<br>
        for e in each(notecell) do<br>
           if (e.EntryNumber == id)then<br>
               return e,e.EntryNumber<br>
           end<br>
        end<br>
        return nil,-1<br>
    end<br>
    <br>
    local region = finale.FCMusicRegion()<br>
    region:SetFullDocument()<br>
    local marks = finale.FCSmartShapeMeasureMarks()<br>
    marks:LoadAllForRegion(region)<br>
    for mark in each(marks) do<br>
        local smartshape = mark:CreateSmartShape()<br>
        if smartshape:IsSlur() then                         <br>
            local leftpoint=finale.FCPoint(1,1)<br>
            local leftseg=smartshape:GetTerminateSegmentLeft()<br>
            local
entry=GetEntryToSmartshape(leftseg.EntryNumber,leftseg.Measure,leftseg.Staff)<br>
            print("Measure:",mark.Measure,"Calculation
    ok?",smartshape:CalcLeftEntryMetricPos(entry,leftpoint),<br>
                      "X:",leftpoint.X,<br>
                      "Y:",leftpoint.Y)<br>
       end<br>
    end<br>
  </body>
</html>