<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Instead of fermata:Save() use fermata:SaveNew().<br>
All new objects must be saved as SaveNew() in JW Lua.<br>
<br>
<div class="moz-cite-prefix">Am 29.09.2018 um 02:42 schrieb Bryan
Higgins:<br>
</div>
<blockquote type="cite"
cite="mid:85377ac950f26560c03d0d9be316ec6b@motet.com">function
plugindef()<br>
-- This function and the 'finaleplugin' namespace<br>
-- are both reserved for the plug-in definition.<br>
return "Fermatas", "", ""<br>
end<br>
local fermatadef = finale.FCArticulationDef()<br>
local metatools = finale.FCMetatoolAssignments()<br>
metatools:SetMode(2)<br>
metatools:LoadAll()<br>
for metatool in each(metatools) do<br>
if metatool.Keystroke == 70 then<br>
fermatadef:Load(metatool:GetDefID())<br>
break<br>
end<br>
end<br>
<br>
for m, s in eachcell(finenv.Region()) do<br>
local cell = finale.FCCell(m, s)<br>
notecell = finale.FCNoteEntryCell(m, s)<br>
notecell:Load()<br>
if notecell:IsEmpty() then<br>
entry = notecell:AppendEntriesInLayer(1, 1)<br>
if entry then<br>
entry.Duration = finale.WHOLE_NOTE<br>
entry.Legality = true<br>
entry:MakeRest()<br>
local fermata = finale.FCArticulation()<br>
fermata:SetArticulationDef(fermatadef)<br>
fermata:SetNoteEntry(entry)<br>
fermata:Save()<br>
notecell:Save()<br>
end<br>
end<br>
end</blockquote>
<br>
</body>
</html>