[JW Lua] FCSmartShape::SaveNewEverything

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Mon Nov 30 14:32:17 CET 2015


Thomas,

Hairpins aren't note-attached, so note entries (and their frames) aren't 
needed for hairpins.

That said, there are a number of smart shapes-related issues and bugs in 
the PDK Framework, and I think creating measure-attached smart shapes 
might be one of them. All correspondence related to smart shapes are 
saved, as I aim to address all these issues in one go in an upcoming beta.


Best regards,

Jari Williamsson


On 2015-11-18 17:28, Thomas Weber wrote:
> Along the lines of my last post concerning "creating stuff": The documentation for FCSmartShape::SaveNewEverything says:
>
>
> "For note-attached smart shapes, the frame collection that contains the entries need to be saved after the successful return from this method."
>
>
> What does that actually mean?  Do I have to save the Cell/NoteEntryCell the entries supplied to FCSmartShape::SaveNewEverything?  I tried this without success:
>
>
> local region = finenv.Region()
> local cell = finale.FCCell(region.StartMeasure, region.StartStaff)
> local nECell = cell:CreateNoteEntryCell(true, 0)
> -- If the NoteEntryCell contains at least 2 notes, we can attach a hairpin
> if nECell.Count > 1 then
>      local hairpin = finale.FCSmartShape()
>      if not hairpin:SaveNewEverything(nECell:GetItemAt(0), nECell:GetItemAt(1)) then
>          error("Could not save new hairpin")
>      end
>      hairpin:SetHairpinFlags()
>      hairpin.ShapeType = finale.SMARTSHAPE_CRESCENDO
>      nECell:Save()
>      cell:Save()
> end
>
>
> I guess I could write a Wiki page on how to create things once I learned about all this.
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>






More information about the JWLua mailing list