A Packed Project Libaries file version is the same as the version in the build configuration. You can look at the file version just like you would for an executable.
How I normally get the version number is returning the executable version number not the PPL.
I tried getting the version number like this site suggests, and it didn't work. The string returned was blank. I called the suggested code from a VI inside the PPL.
I tried using the Project.Libraries property node but it neve returned any references. It was strange because I enabled scripting, but I still can't see that item under the property node of App. I copied and pasted the snippet you provided and the VI compiled, but as you see below it still does not appear as an option.
I am using these packed project libraries as plugins. I am trying to get the version number of the ppl from a VI inside the PPL. I can work with getting the version number from a VI outside the PPL, so far I just can't seem to get a version number that is not the executable.
While it puts more responsibility on you, the Developer, you could write a "Constant VI" (one that has only an output Indicator whose default Value is set by you) called something like "PPL Version" to return this number. This would place these data fully under your control without you needing "hooks" into aspects of LabVIEW that NI has not provided (yet), possibly because they are not "safe from modification" or because messing with them can have unforseen consequences.
It seems you can only get the version number of the .lvlib (the source), not .lvlibp.
So if you set the packed lib version # to the same as the source, then it will work.
I have been able to retrieve the PPL version programtically at run-time with no issue. It requires adding an extra VI to the project library so that it can interrogate itself:
This same basic logic also works from outside the PPL as well. All you have to do is pass into it a reference to a VI that is in the PPL, and everything else just works.