Home
Reply
Contributor
Maximilien
Posts: 6

Version number (FileInfo::file_version vs. api_get_save_version) validation.

Version number (FileInfo::file_version vs. api_get_save_version)

 

When checking the file version, I use the FileInfo::file_version method, it returns a integer like "2100".

When checking the current ACIS version I use the api_get_save_version function which returns 2 values, major and minor versions.

 

Is it safe to assume the FileInfo::file_version value is "21" for the major version and "00" (in their numerical representation) ?

 

    int fileVersion = fileInfo.file_version();
    int fileMajorVersion = fileVersion / 100;
    int fileMinorVersion = fileVersion % 100;

 

Or is there a better way (api I did not find?) to get the major/minor version from a file when opening it ?

 

Thanks.

 

Maximilien.

Spatial Employee
Entity
Posts: 64

Re: Version number (FileInfo::file_version vs. api_get_save_version) validation.

Hi Maximilien,

 

Your assumption regarding FileInfo::file_version is exactly correct.  Unfortunately, there is no API returning this information for an opened file.

 

John