score.startCmd() | score.endCmd()

Updated 2 Jahren ago
This page shows old instructions for MuseScore 1.
For MuseScore 4 users, see score.startCmd() | score.endCmd().

In addition to what is described in the Doxygen documentation, please note the following:

In some cases you need to wrap your score modifications with calls to score.startCmd() and score.endCmd(). As explained in a reply to the below referenced forum post: "If you don't, then the Plugin API is not obliged to fully process that command before continuing onwards. So whenever you need to rely on the result of a score-changing action to start a different kind of action (or ask information about the result) make sure to wrap said action(s) between a start/endCmd call." One example of when you need to do this is when you call score.appendMeasures() - per the below referenced post.

References

Forum Post: How to change the bar line type of a measure