[JW Lua] Deleting a given Test/Shape Expression Def
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Sun Sep 7 19:34:50 CEST 2014
Charles,
There are a couple of things you need to do:
1. Use DeepDeleteData() instead of DeleteData() for expression defs
(specially important for text expression defs)
2. ALWAYS delete data backwards in Finale, specially if you're browsing
through a collection
3. Every expression in the score need to be remapped to the new
definition locations
Best regards,
Jari Williamsson
On 2014-09-07 13:45, Charles O. Lawrence wrote:
> I have added to the wording. It was unclear what was happening.
>
> My script reports that it has deleted all but 2 text expressions, the
> ones that are being used in the score. However when I open the
> Expression Selection box again, there is only one expression remaining,
> not two.
>
> I hope this clarifies the issue.
>
> **************************
>
> What is the proper way to delete a given Text/Shape Expression Definition?
>
> I tried the following snippet, but it always seems to delete ALL the
> text/shape definitions. The print always says true. There is code that
> determines if I want to actually delete an expression within the …’s.
> The resulting Expression Selection dialog box is empty except for one
> ffff. Help!
>
> local textExpDefs = finale.FCTextExpressionDefs()
>
> textExpDefs:LoadAll()
>
> .
>
> .
>
> .
>
> for ted in each(textExpDefs) do
>
> .
>
> .
>
> .
>
> print ("\t",ted:DeleteData(ted.ItemNo))
>
> .
>
> .
>
> .
>
> end
>
> Thanks,
>
> Charles
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
More information about the JWLua
mailing list