Get TM1 Perspectives Version

Ideas and tips for enhancing your TM1 application
Post Reply
User avatar
gtonkin
MVP
Posts: 530
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: PAL 2.0.1
Excel Version: 2016 64-bit
Location: JHB, South Africa
Contact:

Get TM1 Perspectives Version

Post by gtonkin » Tue Dec 09, 2014 8:16 am

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.

rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Get TM1 Perspectives Version

Post by rmackenzie » Tue Dec 09, 2014 10:31 am

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
Robin Mackenzie

Post Reply