Sibelius.ProgramVersion in the 2018.x era

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sibelius.ProgramVersion in the 2018.x era

Bob Zawalich-3
I, at least, have a lot of plugins that check the Sibelius.ProgramVersion
variable to see if features are available to the plugin.
Until recently, this was a 4-digit number, so 6.2 was 6200, and 7.1.3 was
7130, for example.

The current  value for version 2018.1 is 18100. So it still works, but the
major version is a 2-digit number rather than a single digit.
You can still do a numerical comparison and it works fine, such as:

versionMin = 0 + zg_Sib62Version;
if (Sibelius.ProgramVersion < versionMin)
{
        MyMessageBox(_msgVersionTooEarly & BuildSibVersionText(versionMin) &
".");
        return False;
}



If you want a formatted version of Sibelius.ProgramVersion, for display,  be
careful that you can handle the new format, and not assume that the major
versions will be a single digit.
Here is a routine that I use for this, and it will work fine as long as the
minor version is a single digit and the revision is 1 or 2 digits. Here is
the output of a tool I use to check the
Sibelius.ProgramVersion and score.OriginalProgramVersion.

Sibelius Program Version = 18400
 
score.OriginalProgramVersion = 18400
untitled
   was created in Sibelius version 18.4.0

This is similar to what is in the shipping Score Original Version plugin.

If you ever need to format Sibelius.ProgramVersion or
score.OriginalProgramVersion, here is the code I use, and you are welcome to
use it whenever you might find it useful.


******************************************
BuildSibVersionText "(ver) {

// trace('Program Version = ' & ver);

major = RoundDown(ver / 1000);
minor = (ver % 1000) / 100;
revision = (ver % 100);
digitLow = revision % 10;
if (digitLow = 0)
{
        revision = revision / 10;
}

//trace ('BSVT maj min rev: ' & major & ', ' & minor & ', ' & revision);

vText = major & '.' & minor  & '.' & revision;
return vText;
}"


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com
Reply | Threaded
Open this post in threaded view
|

Re: Sibelius.ProgramVersion in the 2018.x era

Martin Marris
Thank you very much Bob. I really appreciate the information you are
providing in this place.

As it happens we are in the middle of upgrading our computer installations
here to the very latest versions of pretty much everything, so this
information is invaluable.

Martin

-----Original Message-----
From: Plugin-dev [mailto:[hidden email]] On Behalf Of Bob
Zawalich
Sent: Saturday, March 17, 2018 13:44
To: 'A mailing list for Sibelius plug-in developers'
Subject: [Plugin-dev] Sibelius.ProgramVersion in the 2018.x era

I, at least, have a lot of plugins that check the Sibelius.ProgramVersion
variable to see if features are available to the plugin.
Until recently, this was a 4-digit number, so 6.2 was 6200, and 7.1.3 was
7130, for example.

The current  value for version 2018.1 is 18100. So it still works, but the
major version is a 2-digit number rather than a single digit.
You can still do a numerical comparison and it works fine, such as:

versionMin = 0 + zg_Sib62Version;
if (Sibelius.ProgramVersion < versionMin) {
        MyMessageBox(_msgVersionTooEarly & BuildSibVersionText(versionMin) &
".");
        return False;
}



If you want a formatted version of Sibelius.ProgramVersion, for display,  be
careful that you can handle the new format, and not assume that the major
versions will be a single digit.
Here is a routine that I use for this, and it will work fine as long as the
minor version is a single digit and the revision is 1 or 2 digits. Here is
the output of a tool I use to check the Sibelius.ProgramVersion and
score.OriginalProgramVersion.

Sibelius Program Version = 18400
 
score.OriginalProgramVersion = 18400
untitled
   was created in Sibelius version 18.4.0

This is similar to what is in the shipping Score Original Version plugin.

If you ever need to format Sibelius.ProgramVersion or
score.OriginalProgramVersion, here is the code I use, and you are welcome to
use it whenever you might find it useful.


******************************************
BuildSibVersionText "(ver) {

// trace('Program Version = ' & ver);

major = RoundDown(ver / 1000);
minor = (ver % 1000) / 100;
revision = (ver % 100);
digitLow = revision % 10;
if (digitLow = 0)
{
        revision = revision / 10;
}

//trace ('BSVT maj min rev: ' & major & ', ' & minor & ', ' & revision);

vText = major & '.' & minor  & '.' & revision; return vText; }"


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com



_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com
Reply | Threaded
Open this post in threaded view
|

Re: Sibelius.ProgramVersion in the 2018.x era

Bob Zawalich-3
My pleasure. If I go to the trouble of figuring out stuff like this I like
to make it available to other people.

There is some programmer information in this Scoring Notes post on Cloud
Sharing:
https://www.scoringnotes.com/tutorials/cloud-sharing-sibelius-scores-multipl
e-copies/

and also in this Of Notes post on string numbering in notation staves

http://www.rpmseattle.com/of_note/string-numbers-for-notes-on-notation-stave
s-in-sibelius/

Bob


-----Original Message-----
From: Plugin-dev <[hidden email]> On Behalf Of Martin
Marris
Sent: Saturday, March 17, 2018 10:54 AM
To: 'A mailing list for Sibelius plug-in developers'
<[hidden email]>
Subject: Re: [Plugin-dev] Sibelius.ProgramVersion in the 2018.x era

Thank you very much Bob. I really appreciate the information you are
providing in this place.

As it happens we are in the middle of upgrading our computer installations
here to the very latest versions of pretty much everything, so this
information is invaluable.

Martin



_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com