MuseScore2 to Musescore3 : pagenumber pagepos ?

• Feb 24, 2020 - 07:20


I migrate a personal plugins from MuseScore.2 (which works fine), to MusScore.3.
I have an issue to retrieve in MuseScore.3 the properties available in MuseScore.2 : pagenumber ans pagePos

  • pagenumber
    I need the pagenumber of a cursor.
    In MuseScore.2 it is cursor.measure.parent.parent.pagenumber. It works fine.
    In MuseScore.3 , I can't find this property, nor inspect cursor.measure.parent.parent (crash)
    function logInspect(o, oname) {
    console.log("object " + oname + " <" + o.objectName + ">" );
    for(var p in o){
    var t=typeof o[p];
    console.log(" " + p + " / " + t )
    logInspect(cursor.measure.parent, "cursor.measure.parent"): => OK contains parent
    logInspect(cursor.measure.parent.parent, "cursor.measure.parent.parent"): => crash

  • pagepos
    I need the absolute position of a note in the page.
    In MuseScore.2 : mnote= cursor.element.note[0] . mnote.pagePos.x , mnote.pagePos.y , mnote.bbox.width , mnote.bbox.height. It works fine.
    In MuseScore.3 , pagePos disappears...

  • dolayout
    For info : I understand that score.doLayout() is replaced by a score.startCmd() ... score.endCmd()

  • purpose of my plugins
    Used with MuseScore line command
    input : a MusicXML file and my ad-hoc plugins-MuseScore
    Output : jpeg pages with score rendering, text file with fraphical positions of the notes

Enclosed a draft of my MuseScore3 plugins, which does not work yet. As soon it will work, I will publish feed-back for other users who need similar functionalities
Thank you for your support
Franck Revolle

Attachment Size
expresseur_scan.qml 4.26 KB

Do you still have an unanswered question? Please log in first to post your question.