[JW Lua] Attaching a new entry-based custom smart line to a score

Jan Angermüller jan at angermueller.com
Tue Jun 28 18:56:41 CEST 2016


That's fantastic, Chris ! Thanks a lot.
The PresetShape=true is indeed irritating.

Have you also been successful in attaching a notehead-attached 
smartshape, like the glissando or the tab slide ?
I have only been able to clone them, but not to create them. Or the 
created glissandi turned out to be entry-based (="Attach to Notes") with 
buggy behaviour, but not "Attach to Noteheads"-glissandi.
In January 2015 I posted the glissando attachment question, but 
unfortunately never got an answer from Jari.

Best,
Jan

Am 28.06.2016 um 18:20 schrieb Chris:
> Hello Jan
>
> Here is a sample that works.
> But I don't understand whyit's necessary to put "PresetShape" to "true"
>
> ---------------------------------
> 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
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160628/de56061c/attachment.html>


More information about the JWLua mailing list