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

Jan Angermüller jan at angermueller.com
Tue Jun 28 21:28:57 CEST 2016


Really great, Chris !
I was missing the NoteID in my script. Never noticed that it existed in 
FCSmartShapeSegment.
There still seems to be a tiny difference to a manually created 
tabslide/glissando, but I don't know if this is relevant:
it now lists as "Attach to Notes" instead of the "Attach to Noteheads" 
when created manually.

Best,
Jan

Am 28.06.2016 um 20:57 schrieb Chris:
> local function 
> createSmartShape(staff,measure,leftnoteentry,rightnoteentry)
>     local smartshape = finale.FCSmartShape()
>     smartshape.ShapeType = finale.SMARTSHAPE_GLISSANDO
>     smartshape.EntryBased = true
>     smartshape.MakeHorizontal = false
>     smartshape.BeatAttached= false
>     smartshape.PresetShape = true
>     smartshape.Visible = true
>     smartshape.LineID= 1
>
>     local leftseg = smartshape:GetTerminateSegmentLeft()
>     leftseg:SetMeasure(measure)
>     leftseg.Staff = staff
>     leftseg:SetEntry(leftnoteentry)
>     leftseg.NoteID = 1
>
>     local rightseg = smartshape:GetTerminateSegmentRight()
>     rightseg:SetMeasure(measure)
>     rightseg.Staff = staff
>     rightseg:SetEntry(rightnoteentry)
>     rightseg.NoteID = 1
>
>     smartshape:SaveNewEverything(NULL,NULL)
> end
>
> local noteentrycell = finale.FCNoteEntryCell(1, 1)
> noteentrycell:Load()
> local leftnoteentry = noteentrycell:FindEntryStartPosition(0,1)
> local rightnoteentry = noteentrycell:FindEntryStartPosition(2048,1)
>
> createSmartShape(1,1,leftnoteentry,rightnoteentry)

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


More information about the JWLua mailing list