<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Jan<br>
<br>
Here is a sample that works.<br>
But I don't understand why<span id="result_box" class="short_text"
lang="en"><span class=""></span> <span class="">it's necessary to
put "PresetShape" to "true"</span></span><br>
<br>
---------------------------------<br>
<pre class="moz-signature" cols="72">local function createLine()
local csld = finale.FCCustomSmartLineDef()
csld.Horizontal = true
csld.LineStyle = finale.CUSTOMLINE_SOLID
csld.StartArrowheadStyle = finale.CLENDPOINT_HOOK
csld.StartHookLength = -1451
csld.EndArrowheadStyle = finale.CLENDPOINT_HOOK
csld.EndHookLength = -1451
csld.LineWidth = 363
csld:SaveNew()
return csld.ItemNo
end
local function createSmartShape(staff,measure,lineID)
local smartshape = finale.FCSmartShape()
smartshape.ShapeType = finale.SMARTSHAPE_CUSTOM
smartshape.EntryBased = false
smartshape.MakeHorizontal = true
smartshape.BeatAttached= true
smartshape.Visible = true
smartshape.PresetShape = true
smartshape.LineID= lineID
local leftseg = smartshape:GetTerminateSegmentLeft()
leftseg:SetMeasure(measure)
leftseg:SetMeasurePos(0)
leftseg:SetStaff(staff)
leftseg:SetEndpointOffsetX(0)
leftseg:SetEndpointOffsetY(30)
local rightseg = smartshape:GetTerminateSegmentRight()
rightseg:SetMeasure(measure)
rightseg:SetMeasurePos(4096)
rightseg:SetStaff(staff)
rightseg:SetEndpointOffsetX(0)
rightseg:SetEndpointOffsetY(30)
smartshape:SaveNewEverything(NULL,NULL)
end
local lineID = createLine()
createSmartShape(1,1,lineID)
---------------------------------
Best regards
Chris</pre>
</body>
</html>