Here’s the code snippet to programmatically get a module’s version.
Sys.getRegistry().getModule("moduleName") .getVendorVersion().toString();
Or if your class has a TYPE field
Sys.getRegistry().getModule(TYPE.getModule().getModuleName()) .getVendorVersion().toString();
This returns the vendorVersion value written in the module’s build.xml as shown below.
<module bajaVersion="3.4" description="Niagara Ax Module" edition="j2se-5.0" name="NiagaraModule" preferredSymbol="nm" vendor="Tridium Inc" vendorVersion="1.3.1" >
Disclaimer: Niagara Ax tips in this website are sourced from the Open Niagara Ax online community http://www.niagara-central.com/ . A forum where you can ask and resolve Niagara framework related queries.