Preview Functions Raster Services Globals Table of Contents

Product Info

Availability  LightWave® 6.0
Component  Layout, Modeler
Header  lwhost.h

The product info global returns the product (LightWave® or Inspire), its major and minor version numbers, and its build number. Build numbers can be used to distinguish between bug-fix revisions for which the major and minor version numbers weren't incremented, which can happen in particular when the revision only affects one platform. See also the compatibility discussion.

Global Call

   unsigned int prodinfo;
   prodinfo = ( unsigned int ) global( LWPRODUCTINFO_GLOBAL,
      GFUSE_TRANSIENT );

The global function ordinarily returns a void *, so this should be cast to an integer type to get the return value.

The product ID is in the low four bits of the return value. The build number is in bits 15 - 4, the minor version number is in bits 19 - 16, and the major revision number is in bits 23 - 20. All of these components can be extracted using macros defined in lwhost.h.

   product = prodinfo & LWINF_PRODUCT;
   major = LWINF_GETMAJOR( prodinfo );
   minor = LWINF_GETMINOR( prodinfo );
   build = LWINF_GETBUILD( prodinfo );

Currently, the product can be LWINF_PRODLWAV (LightWave®), LWINF_PRODINSP3D (Inspire), or LWINF_PRODOTHER.