10-15-2022 08:33 AM
I like the idea of having a light-weight tool that shows selected VI version, not launching entire LabVIEW or Run-Time Engine instance. The most obvious would be to open a VI in any HEX editor and look at its beginning.
It's uncomfortable and a bit difficult to catch one's eye on the version bytes immediately. Also requires a HEX editor to be installed. Much simplier is to launch a console app, that would show the version. Ideally it should be made as a RMB context menu entry to quickly access it from the OS. So, developing Hooovahh's idea about the 'vers' section further, I tested two variants.
1. Use of pylabview tool (by Mefistotelis) - requires Python 3.x with Pillow package, doesn't need LabVIEW or RTE installed.
readRSRC -i "Untitled 1.vi" -l | findstr vers
(grep can be used instead of findstr as well).
As the author says, pylabview was tested on LabVIEW up to 2014, so it's theoretically possible that smth goes wrong in the higher versions. Also I don't have Python on each my machine installed , so I decided not to rely on this method.
2. Use of lvrt.dll from any LabVIEW distribution - yes, it's possible to call REdLoadResFile from lvrt and it doesn't require entire RTE to be initialized. To demonstarte this I have written a small console app, that links to lvrt, loads selected VI with REdLoadResFile and outputs the vers section contents.
It works with any lvrt from LV 7.1. or higher and doesn't require both LabVIEW and RTE or any extra libraries. The app along with the sources is attached. It's also very easy to add it to the Windows context menu with FileTypesMan tool (by NirSoft), here's the instruction.