<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Everyone,<div class=""><br class=""></div><div class="">I have two unrelated questions today. The first with defining an enclosure for an expression, and the second for deleting unused expressions.</div><div class=""><br class=""></div><div class="">1) Basically, for any given text expression definition, I want to create an enclosure. The documentation for enclosures is clear, though I can neither create an enclosure definition nor modify an enclosure on an expression definition.</div><div class=""><br class=""></div><div class="">local enclosure = finale.FCEnclosure()</div><div class=""><br class=""></div><div class="">Returns the error: attempt to call field 'FCEnclosure' (a table value)</div><div class=""><br class=""></div><div class="">And I’ve already read through the thread from a couple years ago (<a href="http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/2016-April/003026.html" class="">http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/2016-April/003026.html</a>). Has anyone been able to figure this out since then? A code sample would be great.</div><div class=""><br class=""></div><div class="">2) Is there a way to detect if an expression definition is used in the score? I could loop through every expression in the score and just make a list of the used expression definitions, however, that is potentially slow. The end goal is to delete unused definitions to cleanup the file. I can already delete definitions.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Nick Mazuk</div></body></html>