Reset TM1 Window Sizes

Ideas and tips for enhancing your TM1 application
Post Reply
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Reset TM1 Window Sizes

Post by Steve Vincent »

We have a wide variety of users that use TM1 via the TM1 Excel addin installed on their PC or citrix as well as with single or dual monitors. There have been a number of occasions where the last saved state of a TM1 window has caused a user to "loose" the window when it is drawn outside of their current setups' range.

Up to now a fix has needed a manual change to the TM1P.INI file. This has either been via a remote connection or trying to talk the user through doing it themselves. To improve this support i have created a simple Windows batch file to remove the offending settings so the next time TM1 is launched they are recreated with default values.

WARNING!
  • This has only been tested on Windows XP SP3 with TM1 9.5.2.
  • I'm fairly confident the location of the TM1P.INI has remained the same since at least 8.1.8, but it relies on this to work.
  • For citrix, it expects the server uses a mapping that equates to the C:\ of the users PC.
TO USE;
  • download the attached ZIP file.
  • extract the .BAT file from the ZIP.
  • ensure you are logged out of cirtix / TM1 is not running locally on your PC.
  • double-click the .BAT to run (should take less than 1s).
  • re-launch citrix / TM1 and the windows should be reset to a default size / location
I ACCEPT NO LIABILITY WHAT SO EVER FOR ANY DAMAGE THIS MAY ACCIDENTALLY DO TO YOUR SYSTEMS. PLEASE BACK UP YOUR FILES BEFORE TRYING IT!
Attachments
TM1_RESET_WINDOWS.zip
(461 Bytes) Downloaded 596 times
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Andy Key
MVP
Posts: 351
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: Reset TM1 Window Sizes

Post by Andy Key »

Alternatively, when you get a window that has drawn itself on your (now disconnected) second monitor, press Alt-Space (to open up the menu that you get when you click on the icon in the top left of a window), M (to select Move), then use the cursor keys to move the window, normally to the left, to make it visible.

Mice? Who needs 'em.

:wq
Andy Key
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Reset TM1 Window Sizes

Post by lotsaram »

Andy Key wrote:Alternatively, when you get a window that has drawn itself on your (now disconnected) second monitor, press Alt-Space (to open up the menu that you get when you click on the icon in the top left of a window), M (to select Move), then use the cursor keys to move the window, normally to the left, to make it visible.

Mice? Who needs 'em.

:wq
Move option is disabled if the window happens to be maximized on the unavailable 2nd monitor. More foolproof is alt + spacebar followed by n key to minimize. then the window should be able to be opened from the taskbar on the available default monitor.
Neeta
Posts: 2
Joined: Tue Nov 01, 2011 3:05 pm
OLAP Product: Cognos TM1
Version: 9.4
Excel Version: Excel 2007

Re: Reset TM1 Window Sizes

Post by Neeta »

I had the same problem
I made the cube browse the active window (even though I could not see it)
then pressed the Window key (the one next to the function key on the bottom left) together with the arrow keys to bring it onto the active monitor. Thereafter, all TM1 views used the correct monitor.
Carl Lonsdale
Posts: 11
Joined: Thu Feb 14, 2013 7:20 pm
OLAP Product: TM1
Version: 9.52 - 10.1
Excel Version: 14.0.6129.5

Re: Reset TM1 Window Sizes

Post by Carl Lonsdale »

Neeta wrote:I had the same problem
I made the cube browse the active window (even though I could not see it)
then pressed the Window key (the one next to the function key on the bottom left) together with the arrow keys to bring it onto the active monitor. Thereafter, all TM1 views used the correct monitor.
^This, this is brilliant and saved me when I was meeting with my boss. So thanks!
risk
Posts: 6
Joined: Thu Feb 21, 2013 2:56 pm
OLAP Product: TM1
Version: 9.5.2 FP3
Excel Version: 2010 and 2013 32bit

Re: Reset TM1 Window Sizes

Post by risk »

Not sure if this would be useful for others but it also resets TM1 window sizes. Tested on Windows 7 64 bit. Use at your own risk/discretion. I accept no liability if you use this code.

vbScript

Code: Select all

'''optional agruements for opentextfile
''	 True is Unicode, False is ASCII, Default is system default, omitted is ASCII
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0   
Const ForReading = 1, ForWriting = 2, ForAppending = 8

Set oShell = CreateObject("WScript.Shell")
targfile = oShell.ExpandEnvironmentStrings("%APPDATA%\Applix\TM1") + "\tm1p.ini"
backdir = oShell.ExpandEnvironmentStrings("%TEMP%") + "\"
Set objFSO = CreateObject("Scripting.FileSystemObject")


If objFSO.FileExists(targfile) Then
    'Copy it to the backup directory then open the file.
    objFSO.CopyFile targfile, backdir, True

    Set objTextFile = objFSO.OpenTextFile(targfile, ForReading, false, TristateTrue )

    'Read through each line of the file for the entry to set
    Do Until objTextFile.AtEndOfStream
        strNextLine = objTextFile.Readline

        intLineFinder = InStr(strNextLine, "MainWindowLayoutInfo =")
        If intLineFinder <> 0 Then
            strNextLine = "MainWindowLayoutInfo =  "
        End If

        intLineFinder = InStr(strNextLine, "SubsetWindowLayoutInfo =")
        If intLineFinder <> 0 Then
            strNextLine = "SubsetWindowLayoutInfo =  "
        End If

        intLineFinder = InStr(strNextLine, "SecurityAssignmentWindowLayoutInfo =")
        If intLineFinder <> 0 Then
            strNextLine = "SecurityAssignmentWindowLayoutInfo =  "
        End If

        strNewFile = strNewFile & strNextLine & vbCrLf
    Loop

    objTextFile.Close

    'Write the file with the new entry
    '
    Set objTextFile = objFSO.OpenTextFile(targfile, ForWriting, false, TristateTrue)

    objTextFile.WriteLine strNewFile
    objTextFile.Close
End If
Post Reply