[JW Lua] Workaround for FCStaffStyleDef load problems

Jan Angermüller jan at angermueller.com
Wed May 11 11:17:23 CEST 2016


Here is a workaround that solves both the FCStaffStyleDefs:LoadAll() and 
the FCStaffStyleDef:Load() problem described in the emails before. 
Checking FCStaffStyleDef:GetName() seems to be a valid way for that.
So if you want to browse all staff styles, use something like this:

for i =1,10000,1 do
     local namestr=finale.FCString()
     local s=finale.FCStaffStyleDef()
     s:Load(i)
     s:GetName(namestr)
     if namestr.LuaString~="" then
         ...process staff style ...
     else
         break
     end
end

Best,
Jan



More information about the JWLua mailing list