Page 1 of 1

Get TM1 Perspectives Version

Posted: Tue Dec 09, 2014 8:16 am
by gtonkin
This may be useful VBA code to some:

Code: Select all

Sub TM1PerspectivesVersion()
Dim strVersion As String

strVersion = Application.Run("buildnumber")
Debug.Print strVersion

End Sub
strVersion should have the full build number - mine says 10.2.20100.11111 (TM1XL.DLL) - same as product version for TM1ULibDll.dll

@Admins-please move to Tips and tricks if useful as I cannot post directly.

Re: Get TM1 Perspectives Version

Posted: Tue Dec 09, 2014 10:31 am
by rmackenzie
This method will be more version agnostic:

Code: Select all

Option Explicit

Declare Sub TM1SystemBuildNumber_VB Lib "tm1api.dll" (ByVal str As String, ByVal Max As Integer)

Public Function GetTM1ApiVersion() As String
    
    Dim strVersion As String
    
    strVersion = String(100, Chr(32))
    
    TM1SystemBuildNumber_VB strVersion, 100
    
    GetTM1ApiVersion = Trim(strVersion)

End Function