[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!

Parents
  • 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



Reply
  • 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



Children
No Data