[JW Lua] Applying MENUCMD_NOTESPACING to non-selected measures

Jan Angermüller jan at angermueller.com
Mon Jul 6 16:57:09 CEST 2015


Jari,

thanks for your response and thanks for being back on the list !

SetInDocument() was one of the missing links.
But unfortunately, it still doesn't work in all cases.
It only works if a tool was selected before running the plug-in that 
supports a region
(as the documentation for SetInDocument says: "The region will only be 
visually present if the currently selected tool in Finale supports 
regions.")

So it would be great if you could*add a MenuCommand for the selection tool*.
Then it would be:

     finenv.UI():MenuCommand(finale.MENUCMD_SELECTIONTOOL)
     finenv.Region():SetFullDocument()
     finenv.Region():SetInDocument()
     finenv.UI():MenuCommand(finale.MENUCMD_NOTESPACING )

Best regards,
Jan

Am 06.07.2015 um 16:36 schrieb Jari Williamsson:
> Jan,
>
> After finenv.Region():SetFullDocument(), use a subsequent 
> SetInDocument() for the region object. I think you need an explicit 
> region object for the SetFullDocument+SetInDocument(), since 
> SetFullDocument() sets the values internally for the object and 
> SetInDocument() applies the object's values on the document view.
>
>
> Best regards,
>
> Jari Williamsson
>
>
> On 2015-05-30 21:15, Jan Angermüller wrote:
>> Jari,
>>
>> I have a document with no measures selected and would like to re-do the
>> music spacing with:
>>
>> finenv.UI():MenuCommand(finale.MENUCMD_NOTESPACING )
>>
>> As no measures were selected nothing happens when I call the script.
>>
>> Now if I insert
>> finenv.Region():SetFullDocument()
>> before calling the MenuCommand still nothing happens.
>>
>> Is there anything I can do to tell the menucommand that it shall process
>> the full document ?
>> Another idea would be to add a notespacing function to FCMusicRegion -
>> like you did with RebarMusic and RebeamMusic.
>>
>> (Making the plug-in "Require selection"-dependent is not a good option
>> in this case as this plug-in will always process the full document.)
>>
>> All the best,
>> Jan
>>
>>
>>
>>
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>>
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>


-- 
Jan Angermüller
Jevenstedter Str. 80
22547 Hamburg
Tel. 040 - 28 94 84 82
www.angermueller.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20150706/f8e3d913/attachment-0002.html>


More information about the JWLua mailing list