[JW Lua] Creating a new Expression Category
Jan Angermüller
jan at angermueller.com
Wed May 11 14:12:12 CEST 2016
From the documentation
http://www.finaletips.nu/frameworkref/class_f_c_category_def.html:
"Please note that Finale does not allow plug-ins to create or delete
category definitions."
Am 11.05.2016 um 13:56 schrieb Robert Wildling:
> Hi,
>
> I am looking for a way to create a new Expression Category withe the
> name of "unused" (the intention is to move all unused textExprDefs and
> ShaeexprDefs to that category).
>
> Starting out, I thought, this can only be done via selecting a
> specific category and saving it using "SaveAs" and a new "ItemNo",
> like this:
>
> ``[lua]
> local dynCat = finale.FCCategoryDef()
> if dynCat:Load(2) then
> -- get the category name
> local catName = finale.FCString()
> dynCat:GetName(catName)
>
> -- save it anew
> dynCat:SaveNew()
>
> -- shows tha a new item number
> -- was generated (65535 ??? looks like an error...)
> print(dynCat:GetItemNo())
> end
> ``
>
> But even though the category is assigned a new number (is 65535 an
> indicator for an error here? look strange), no new category was
> created. And if the ItemNo of the original category was changed, a
> second run-through shouldn't work, since Load(2) shouldn't find
> anything at that position... but it does...
>
> I am very confused... any hints and/or help would be much appreciated!
> Thanks!
>
>
> _______________________________________________
> 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/20160511/39d4b744/attachment.htm>
More information about the JWLua
mailing list