View Full Version : Dual Monitor Control
iankids
2009-11-04, 10:39 PM
Hi All,
One of the small annoying gripes I have had with Revit is that it is not truly a dual monitor program.
I have my monitors set up as an extended single screen and I will drag revit over both screens and the resize the views to one screen or the other by simply grabbing the grips on the edge of the view and dragging it to where I want them. Typically, when modelling, I would have my plans, elevations and sections on the left hand screen and the 3d view on the right hand screen so that I can view directly any changes I may make on a floor plan on the 3d view.
Having put my toe into the AutoHotKey water I got to thinking as to whether one could write a script to automatically reposition and resize the views to fit to one screen or the other. Although the scripts turned out to be relatively simple in the end, figuring out how the controls worked was stupendously difficult (my thanks to TLM on the AutoHotKey forums for his help and guidance)
Attached is a zip file which contains two AutoHotKey scripts. One Script "left hand screen control" relocates and resizes all of the views I want on the left hand screen, the other, "right hand screen control" controls the views I want on the right hand screen.
Obviously, this is set up entirely for my preference as to what I want on which screen, and for my screen sizes. They will need to be adjusted to suit how you may wish to work and for your screen size.
The controls are self evident and need a little bit of trial and error to get them right. (If anyone does have difficulty adjusting the script, post a reply and I will do a how to guide). When doing the trial and error adjustments adjust all of the x, y's in the script to be identical even if you are testing only one view. The hot keys for the scripts are ctrl + shift + s for the left hand screen and ctrl + shift + z for the right hand screen. Again, you can adjust them as you see fit. These will function as standalone scripts or you can incorporate them into another script (I have incorporated them into SpeedyUI for my use)
Cheers,
Ian
priitl22047477
2009-11-05, 06:26 PM
Thanks for posting. I will definitely try it out.
iankids
2009-11-05, 10:58 PM
I have reworked the code to to add another feature and to make it more complete.
Within the one script there are now three commands:
Ctrl+F1 will resize revit to the full extents of your screen (again, as this is an x, y, cordinate it will need to be checked using AutoIt win Spy and altered in the first winmove command - currently set at 0,0,3350,1050)
As previously, Crtl+Shift+z controls the lh screen (currently set for 0,0 [,1300,800]) and
Crtl+Shift+s controls the right hand screen (currently set for 1300,0 [,1650,800]
additionally I have added the shortcut command "zf" so that any rearranged window will zoom fit to the new size for each view.
Cheers,
Ian
Dual Test 1 zip has a small video showing the script in action
priitl22047477
2009-11-30, 08:09 AM
I like you approach, but your script moves all views to monitor 1 and 3d to monitor 2.
I modified it to move views to monitor 1 and schedules to monitor 2.
But now i would like it to move only active view , either on monitor 1 or 2 (1 half or 2 half).
So i would have 3 shortcut keys.
At the moment I can not figure out how to move only the active (topmost) view.
Or how to move the first open schedule to 1 half of second monitor and second schedule to 2nd half of second monitor.
Then I have this problem with project browser, as i hide it all the time (w shortcut key). Then the coordinates get messed up by moving the views by the width of the bb to the left. (solution move bb to the right edge).
If i figure it out , I will post it here. Any help is welcome.
iankids
2009-11-30, 09:41 AM
Hi Priit,
Glad you have found the script somewhat useful.
As you rightly note, the script as written had most views on screen one with the 3d view was on screen two. It was written like this as this is my idiosyncratic way of working, I fully expected others to set things up for themselves.
With regard to the resizing of all window if the project browser is closed, if one could discover the control for the project browser, it would be possible to write and if statement which drove different sets of coordinates depending on the state of the project browser.
If I get a few moments tonight or early tomorrow, I will have a quick look to see if I can discover the control for the project browser.
Cheers,
Ian
priitl22047477
2009-11-30, 10:18 AM
project browse is not the main problem for me.
For me the main problem is how to use this script for active view only.
But anyway - thank you for great idea.
We, multiple monitor users, should stick together :)
iankids
2009-11-30, 07:28 PM
project browse is not the main problem for me.
For me the main problem is how to use this script for active view only.
But anyway - thank you for great idea.
We, multiple monitor users, should stick together :)
When setting about to write the code in the first instance, I too, thought that the best way would be to control the active child window. Unfortunately, this proved to be, for me at least, an impossible task.
The way which the revit code controls the child windows (the ClassNN control has a sub string starting at 1 & going forward as each new view is opened) made it impossible for winmove command to work as it couldn't discover the subset number of the active window which would change as views were opened or closed.
Thus, I ended up controlling the views via their names which has led to the current script.
Given that the winmove command works on the view name, if one wanted to pursue a new code to control any view to either monitor I think I would look at a separate code which finds the active view name, locates the window size and position and then moves it to the opposite monitor using a conditional if statement.
Cheers,
Ian
krunung
2010-01-13, 05:15 PM
I know nothing about the hotkey process but getting my revit to automatically maximize across both monitors is very appealing. How do I implement the file that you uploaded? Where can I customize my hotkey settings. I've been searching for the last hour with no luck. Please help!
Thanks,
Kris
bholmes
2010-01-13, 07:39 PM
I know nothing about the hotkey process but getting my revit to automatically maximize across both monitors is very appealing. How do I implement the file that you uploaded? Where can I customize my hotkey settings. I've been searching for the last hour with no luck. Please help!
Thanks,
Kris
http://www.autohotkey.com/
iankids
2010-01-13, 08:02 PM
I know nothing about the hotkey process but getting my revit to automatically maximize across both monitors is very appealing. How do I implement the file that you uploaded? Where can I customize my hotkey settings. I've been searching for the last hour with no luck. Please help!
Thanks,
Kris
Hi Kris,
In the first instance, you will need to download the AuotHotKey pack which contains all the tools you need to edit the script.
The script itself is:
--------------------------------------------------------------------------------------------------------------
WinMove, Revit,,0,0, 3350, 1050
Return ; Stops the script from automatically executing further hotkey(s).
^+z::
ControlGet, ctrlH, HWND,, Elevation, Revit
WinMove, ahk_id %ctrlH%,, 0, 0 [,1300,800 ]
ControlGet, ctrlH, HWND,, Floor Plan, Revit
WinMove, ahk_id %ctrlH%,, 0, 0 [,1300,800 ]
ControlGet, ctrlH, HWND,, Section, Revit
WinMove, ahk_id %ctrlH%,, 0, 0 [,1300,800 ]
ControlGet, ctrlH, HWND,, Ceiling Plan, Revit
WinMove, ahk_id %ctrlH%,, 0, 0 [,1300,800 ]
Send, zf
Return
^+s::
ControlGet, ctrlH, HWND,, 3D View, Revit
WinMove, ahk_id %ctrlH%,, 1300, 0 [,1650,800 ]
Send, zf
-------------------------------------------------------------------------------------------------------------
Those part of the code you need to amend to suit your screen sizes are :"3350, 1050" = total screen size of both screens - "[,1300,800 ]" = top lh corner of left hand screen (inside the project browser) to the bottom rh corner of the left hand screen & "1300, 0 [,1650,800 ]" top lh corner to bottom rh corner of right hand screen.
To locate the x & y coordinates on you screen, use the winspy program in the download kit from Autohotkey.
The commands to operate the lh screen and right hand screen are: "^+z::" = Ctl+Shift+z and "^+s::" = ctl+shift+s respectively. Again, these can be amended to whatever suit you.
Hope this helps
Ian
erlingpt
2010-02-01, 10:00 AM
Nice script!
martijnderiet
2010-02-02, 07:53 AM
Great script (it seems like from reading this post). Will be trying it soon. I'm about to buy a new set of monitors, so I'll wait for a bit, but this certainly solves a nagging issue for me!
dzatto
2010-02-18, 10:56 PM
Okay, noob question. I just ordered Revit Archtiecture suite (finally joined the dark side!). I've been using Autocad Architecture for years and years. I run 3 monitors. Stretch ACA across 2 of them with no toolbars or palettes. I put all my palettes on the third monitor.
How will Revit handle this, if at all? Am I in for a rude awakening? Anyone tried Revit with 3 monitors yet??
This is a great idea - it is very annoying to open Revit and have to spend time re-doing the layout.
I modified it by adding ctrl shift a to move all views to where I want them so that I don't have to do the left separately than the right. I might even have to come up with some for other software that doesn't play nice with dual monitors . . . .
My big complaint is that I really want to be able to direct the active view to where I want it - so that I could take a schedule, for example, and put it on half of one screen, and the plan on another screen, and the sheet on the other half of the schedule screen. But you can't always know what layout you will want in the future, so the active screen would be nice to be able to do. Pity!!!
iankids
2011-03-21, 06:14 AM
Hi Lafe,
Thanks for the compliment.
The active screen control is very tricky indeed and is one that I never fully overcame. I would be interested if you ever resolve the control issue.
I don't drop by here very much any more, so if you do come up with an answer please post a comment on RevitForum.org
Cheers
SCShell
2011-03-22, 02:04 PM
Hey there,
Don't know much....but I read that RAC2012 will finally support Dual Monitors!
Good Luck
Steve
Lashers
2011-03-30, 07:09 PM
Hey there,
Don't know much....but I read that RAC2012 will finally support Dual Monitors!
Good Luck
Steve
:-) When will that be then? heh heh . .
krzystoff
2011-04-21, 04:12 AM
Hey there,
Don't know much....but I read that RAC2012 will finally support Dual Monitors!
Good Luck
Steve
many of the multi-monitor revit legions would like to know where you heard this?
as far as I can tell, autodesk has no mention of it in their 2012 products...
zanzibarbob7
2011-05-05, 08:47 PM
I have several monitors and I like that I can drag the properties and project browser onto another screen, but I would really like to drag a view onto another screen. This is something you can do in PS and it makes life easier.
matthewbland16109179
2011-05-19, 04:10 PM
I have reworked the code to to add another feature and to make it more complete.
Within the one script there are now three commands:
Ctrl+F1 will resize revit to the full extents of your screen (again, as this is an x, y, cordinate it will need to be checked using AutoIt win Spy and altered in the first winmove command - currently set at 0,0,3350,1050)
As previously, Crtl+Shift+z controls the lh screen (currently set for 0,0 [,1300,800]) and
Crtl+Shift+s controls the right hand screen (currently set for 1300,0 [,1650,800]
additionally I have added the shortcut command "zf" so that any rearranged window will zoom fit to the new size for each view.
Cheers,
Ian
Dual Test 1 zip has a small video showing the script in action
Hi Ian, have just been looking at this workaround and downloaded the zip file of the script. Being a newbie at this sort of thing I don't know what to do with the ahk file? I know it stands for autohotkey, but what do I do with it please? All the best Matt.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.