<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks, Jan -- that does the trick. And that is indeed what I would call a "weak link"! Looks like the same thing has to be done with positioning, copying from the category to each expression that should be using it. I'm guessing Finale must do the same thing under the covers when you make a change to a category through the UI.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Robert, this smells like something that should be in the library, something like category:resync_expressions() and/or expression.resync_to_category(). Do you agree? I'm going to need to add this functionality to my Options as JSON script, so if you want it in the library I may as well make that part of my PR.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Aaron.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 24, 2023 at 2:42 PM Jan Angermüller <<a href="mailto:jan@angermueller.com">jan@angermueller.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
FCString:ReplaceCategoryFonts() is what you need.<br>
This changes "Finale Maestro" dynamics to "Bravura".<br>
<br>
local catnumber=1<br>
local c=finale.FCCategoryDef()<br>
c:Load(catnumber)<br>
<br>
local f=finale.FCFontInfo()<br>
c:GetMusicFontInfo(f)<br>
f.Name="Bravura"<br>
c:SetMusicFontInfo(f)<br>
c:Save()<br>
<br>
local te=finale.FCTextExpressionDefs()<br>
te:LoadAll()<br>
local t<br>
for t in each(te) do<br>
if t.CategoryID==catnumber then<br>
local tstr=t:CreateTextString() <br>
if tstr then<br>
tstr:ReplaceCategoryFonts(c,finale.CATEGORYMODE_MUSIC,true) <br>
--tstr:ReplaceCategoryFonts(c,finale.CATEGORYMODE_TEXT,true) <br>
--tstr:ReplaceCategoryFonts(c,finale.CATEGORYMODE_NUMBER,true)
<br>
t:SaveTextString(tstr)<br>
end<br>
end<br>
end<br>
<br>
Jan<br>
<br>
<div>Am 24.03.2023 um 19:22 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">You have to rewrite the font info in the <a href="http://jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:enigmastrings" target="_blank">enigma string</a>. I think there are
library functions to help with this. Look in enigma_string
library. Somewhere in the repo there's an example of assigning
an expressions to a category and syncing the font, but I don't
remember where now.<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Mar 24, 2023 at
10:47 AM Aaron Sherber <<a href="mailto:aaron@sherber.com" target="_blank">aaron@sherber.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Jan,</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks --
but update how? I've tried setting and unsetting
UseCategoryFonts, force setting the CategoryID, and using
exp.AssignToCategory(), but none of those seem to work.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Aaron.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Mar 24, 2023 at
11:11 AM Jan Angermüller <<a href="mailto:jan@angermueller.com" target="_blank">jan@angermueller.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Hi Aaron,<br>
<br>
here is a very old mail from Jari. You need to update
the expressions with an extra loop.<br>
<br>
<div>Am 04.09.2014 um 18:29 schrieb Jari Williamsson:<br>
</div>
<blockquote type="cite">Some additional info: Expression
defs are actually very weak linked with the categories
in Finale (much more weak than the impression the UI
gives). If you make changes to a category, you need to
manually update all expression defs that connects that
category. <br>
</blockquote>
<br>
Jan<br>
<br>
<br>
<br>
<div>Am 24.03.2023 um 14:06 schrieb Aaron Sherber:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi
all,<br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">If
I use FCCategoryDef to change the font of a
category, it appears that existing expressions
which are set to use the category font don't
automatically pick up this change. If I go into
the Expression Designer, the expressions still
show using their old font. I need to uncheck and
recheck "Use Category Fonts" in order to get each
expression to update. Doing this in code (i.e.,
looping through FCTextExpressionDefs and setting
UseCategoryFont to false and then true and saving)
doesn't seem to work either.</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Is
there some programmatic way to get expressions to
recognize changes to their categories?</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks,</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Aaron.</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
JWLua mailing list
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a href="http://www.elbsound.studio" target="_blank">www.elbsound.studio</a></pre>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
JWLua mailing list
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a href="http://www.elbsound.studio" target="_blank">www.elbsound.studio</a></pre>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" rel="noreferrer" target="_blank">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote></div>