Detect multi- computer monitors environment and display controls?

Is there a way that Mathematica is able to identify and ID multiple monitors attached to a desktop computer? And how can I do to have Mathematica output a graphic to a separate notebook to a specific ID monitor?

I have a special dynamic graphic created with Manipulate[]. I will like to have the graphic displayed in one monitor other that the primary monitor with the code displayed. Even more, I need the controls in the primary display monitor but the manipulated graphic display in the second monitor environment.

I am not sure you got my problem . I have two monitors attached to one computer . This computer uses 3 separate graphic cards. I need WM to output a new notebook within the second monitor. This new notebook will render the graphic produced by the code run from the first notebook found in the first monitor display.

JEC

Jose,

I don’t know if there are any better approaches but I would move a window to where you want it, size it, and use the option inspector to figure out the location of the window ( the pixel location will extend beyond your primary monitor)

This old article might also help: redirect-of-mathematica-graphics-output-to-another-computer-screen

Regards,

Neil

OK.. Thanks but it is possible to strip the control s of the manipulate command on a separate notebook? I want to control the manipulate variables from one moitor and project the resulting graphic on a separate notebook.

Jose,

The short answer is yes. Here is an example that creates a window and moves it to a new monitor and lets me control it from the original Notebook. The key is to find the location of your second or third monitor. I did that by manually moving a window there and doing the following

testwindow = CreateWindow[];

move the window to the second monitor (you can also size it by setting that option as well) and do

myMargins = WindowMargins /. Options[testwindow, WindowMargins]
(* {{876, Automatic}, {Automatic, 242}} *)

copy the location and use it below. The notebook does the following:

Create a dynamic slider to control it

DynamicModule[{}, {Slider[Dynamic[x], {.1, 2}], Dynamic[x]}]

You can plot something on your main monitor:

DynamicModule[{}, Dynamic[Plot[Sin[x*t], {t, 0, 10}]]]

Now duplicate it in a new window and send it to the other monitor:

win = CreateWindow[
  DocumentNotebook[
   DynamicModule[{}, Dynamic[Plot[Sin[x*t], {t, 0, 10}]]]]]
SetOptions[win, 
 WindowMargins -> {{-1378, Automatic}, {Automatic, 41}}]

Now control both plots from your slider. You can obviously mix and match various controls and dynamic graphics.

Regards,

Neil

2 Likes