Get TM1 Perspectives Version

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

Get TM1 Perspectives Version

Post 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.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Get TM1 Perspectives Version

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