[JW Lua] Modifying beams

Thomas Weber thomas.weber at notengrafik.com
Wed Sep 9 23:41:29 CEST 2015


Thanks a lot for that feedback, Jan.  It turns out two things were missing to actually conjure up an effective beam mod:  a SaveNew(), and the note entry has to be saved as well.  So, this does the job:


for noteentry in eachentrysaved(finenv.Region()) do
    local bm = finale.FCBeamMod()
    bm:SetNoteEntry(noteentry)
    bm:SaveNew()
    if bm:LoadFirst() then
        bm.LeftVerticalOffset = 100
        bm:Save()
    end
end


Am 09.09.2015 um 18:23 schrieb Jan Angermüller:
> Have you tried the other Save-functions from FCBeamMod ?
> Save() usually only works with elements that already exist.
> A beam mod probably only exists when it was touched manually.
>
> Jan
>
> Am 09.09.2015 um 18:19 schrieb Thomas Weber:
>> Dear experts,
>>
>> I tryed using a snippet from the class browser (a value and bm:Save() was added):
>>
>>
>> for noteentry in eachentry(finenv.Region()) do
>>      local bm = finale.FCBeamMod()
>>      bm:SetNoteEntry(noteentry)
>>      if bm:LoadFirst() then
>>          bm.LeftVerticalOffset = 100
>>          bm:Save()
>>      end
>> end
>>
>>
>> Interestingly, this does only have a visible effect if the beam has been touched manually with a special tool beforehand.
>>
>> I found that in order to make FCSmartShapeSegment::SetEndpointOffsetX have an effect, one has to flag the FCSmartShapeSegment with FCSmartShapeSegment::|SetCustomOffset||| first.  I wondered whether something similar was needed to work with FCBeamMod, but I didn't see a member that seemed to have a similar purpose to |SetCustomOffset||.
>>
>> What am I missing?
>>
>> Thanks!
>> Thomas Weber
>> |
>>
>> [1] http://www.jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:harpglisssample
>>
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>





More information about the JWLua mailing list