Page 1 of 1

Reset TM1 Window Sizes

Posted: Tue Jan 31, 2012 2:18 pm
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!

Re: Reset TM1 Window Sizes

Posted: Wed Feb 01, 2012 8:03 am
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

Re: Reset TM1 Window Sizes

Posted: Wed Feb 01, 2012 8:35 am
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.

Re: Reset TM1 Window Sizes

Posted: Tue Feb 21, 2012 11:26 am
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.

Re: Reset TM1 Window Sizes

Posted: Tue Feb 19, 2013 4:34 pm
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!

Re: Reset TM1 Window Sizes

Posted: Thu May 16, 2013 5:50 pm
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