[JW Lua] FCPart:GetName() removes line breaks?
Robert Patterson
robert at robertgpatterson.com
Tue Apr 11 17:57:31 CEST 2023
It looks like you can get the raw part name text with
CreateCustomTextString. It won't have any auto numbering appended, but it
should contain newline characters if they are there.
On Mon, Apr 10, 2023 at 9:22 AM Robert Patterson <
robert at robertgpatterson.com> wrote:
> Unfortunately, that is built into the PDK. It is calling
> FX_GetPartName_UTF16 and returning that directly.
>
> On Mon, Apr 10, 2023 at 8:49 AM Jan Angermüller <jan at angermueller.com>
> wrote:
>
>> Robert,
>>
>> could it be that FCPart:GetName() removes not only enigma commands, but
>> also the line breaks?
>>
>> I.e. a two line name like:
>>
>> Acoustic Guitar
>> (Steel Strings)
>>
>> becomes:
>>
>> Acoustic Guitar (Steel Strings)
>>
>> In the documentation it only says:
>> "*On Finale 2012 and later, the string will be set to the current part
>> name each time this method is called. The string is a "print version" of
>> the part name, so there's no Enigma commands for flat/sharps in the string.*
>> "
>>
>> Test code:
>> local part=finale.FCPart(finale.PARTID_CURRENT)
>> local partname=finale.FCString()
>> part:GetName(partname)
>> print(partname.LuaString)
>>
>> Could this be fixed?
>> Or is this a fix value from the Finale PDK?
>>
>> Jan
>> _______________________________________________
>> 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/20230411/b110bd00/attachment.htm>
More information about the JWLua
mailing list