[CE CPP OBD] mdlVersion_getVersionNumbers did not return the version for OBD

Hi everyone,

a short question: I use OBD SDK 10.09.00.083 and OBD V10.09.xxxx. I expect  mdlVersion_getVersionNumbers() will return something like "10.09.xxxx" but it returns "10.16.02.260" which belongs to the underlying USTN-SDK.

How do I get the version Number, wich the User sees?

Thanks a lot!

  • I expect  mdlVersion_getVersionNumbers() will return something like "10.09.xxxx" but it returns "10.16.02.260" which belongs to the underlying USTN-SDK

    It would be dangerous if an app's SDK were to supply functions that hide MicroStation's API!

    How do I get the version Number, wich the User sees?

    The app, in your case OBD, must provide that information.

     
    Regards, Jon Summers
    LA Solutions

  • It would be dangerous if an app's SDK were to supply functions that hide MicroStation's API!

    yes I agree, but the OBD DSK and app is some hybride between a MSTN Version and a OBD Version, with a different (sometimes quite confusing) counting of versions. 

    mdlVersion_getVersionNumbers() returns the app - version-number in CE U14 - U16.. but not in OBD U9 ( Id did not test U7++)

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • Hi ,

    Thank you for reporting and asking this.

    Background/Update:

    MicroStation CONNECT Edition Update 16.0 was our last release based on our previous build systems. Everything since that point is/has been built using more and more Microsoft Azure Devops (too often abbreviated - ADO) workflows and during this transition we have further rationalized our build strategies and consumables for product builds. In addition more of our Vertical products are also making the to ADO build pipelines which drive the build scripts that feed version details to underlying components/products and APIs being built to report correct versions expected.

    Bug and/or Work-around:

    [UPDATE-20220613-RH: The tfapi provides a Product version number very similar to the MS/MSPP function you reference in this thread and can be found here:

    tfapi\mdltfapp.fdf:57:TFAPI_EXPOSE StatusInt mdlTFApplication_getVersionString

    Please give this method a try and use as a 1st preferred work-around.]

    My thoughts are that mdlVersion_getVersionNumbers can/should only provide the documented correct MicroStation/PowerPlatform version or Development (only available w/internal builds passing NULL as 2nd parameter) version numbers.  Given the above build system changes mentioned, I will check to see if OBD SDK provides a method to return version information or ask a Building developer to review and make better/best recommendations. Until then (or Bug/Backlog Item is filed) you could possibly use an approach similar to what I have done in the past (using PowerShell, but use any Microsoft API you prefer) with the MicroStation SDK to obtain version details, something like:

    FILE: ..\bin\SDKCommonEnv.bat:89
    for /f "tokens=*" %%a in ('PowerShell -c "gp -Path HKLM:\SOFTWARE\Bentley\Installed_Products\* | Where {$_.ProductName.Equals("""MicroStation""") } | Sort-Object Version | select ConfigurationPath | select -last 1 | ft -HideTableHeaders" -AutoSize') do set SDKPRODWORKSPACES=%%~aWorkspaces\

    And for the OBD Product/SDK I (by chance) have installed, something like this should be somewhat reliable to produce the information needed:

    C:\Program Files\Bentley\MicroStationCONNECTSDK\bin>for /f "tokens=*" %a in ('PowerShell -c "gp -Path HKLM:\SOFTWARE\Bentley\OpenBuildingsDesigner\* | Where {$_.DisplayProductName -match """OpenBuildings Designer CONNECT Edition""" } | Sort-Object Version | select InstallDir | select -last 1 | ft -HideTableHeaders -AutoSize"') do @echo ITEMS: %a
    ITEMS: C:\Program Files\Bentley\OpenBuildings CONNECT Edition\
    
    C:\Program Files\Bentley\MicroStationCONNECTSDK\bin>for /f "tokens=*" %a in ('PowerShell -c "gp -Path HKLM:\SOFTWARE\Bentley\OpenBuildingsDesigner\* | Where {$_.DisplayProductName -match """OpenBuildings Designer CONNECT Edition""" } | Sort-Object Version | select Version | select -last 1 | ft -HideTableHeaders -AutoSize"') do @echo ITEMS: %a
    ITEMS: 10.09.01.038
    
    C:\Program Files\Bentley\MicroStationCONNECTSDK\bin>for /f "tokens=*" %a in ('PowerShell -c "gp -Path HKLM:\SOFTWARE\Bentley\OpenBuildingsDesignerCONNECTSDK\* | Where {$_.DisplayProductName -match """OpenBuildings Designer CONNECT Edition SDK""" } | Sort-Object Version | select InstallDir | select -last 1 | ft -HideTableHeaders -AutoSize"') do @echo ITEMS: %a
    ITEMS: C:\Program Files\Bentley\OpenBuildings CONNECT Edition\OpenBuildingsDesignerSDK\
    
    C:\Program Files\Bentley\MicroStationCONNECTSDK\bin>for /f "tokens=*" %a in ('PowerShell -c "gp -Path HKLM:\SOFTWARE\Bentley\OpenBuildingsDesignerCONNECTSDK\* | Where {$_.DisplayProductName -match """OpenBuildings Designer CONNECT Edition SDK""" } | Sort-Object Version | select Version | select -last 1 | ft -HideTableHeaders -AutoSize"') do @echo ITEMS: %a
    ITEMS: 10.09.01.038
    
    C:\Program Files\Bentley\MicroStationCONNECTSDK\bin>

    HTH,
    Bob



  • Bob gives us a TriForma API function mdlTFApplication_getVersionString which works well for this requirement.

    I wrote below test code and can get correct OBD version.

    void getOBDVersion()
    {
        char* pVerStr = NULL;
        if (SUCCESS != mdlTFApplication_getVersionString(NULL, &pVerStr))
            return;
        if (NULL != pVerStr)
        {
            mdlDialog_dmsgsPrintA(pVerStr);
            dlmSystem_mdlFree(pVerStr);
        }
    }

    Output is as below:



    Answer Verified By: Volker Hüfner