Setting cameras in view

Hi team,

your kind support is needed for the following question

I am using the SetCameraInViewCommand and its associated Data. All good if I use one window only. but if I open two windows with the same view, how do I set my camera on just one of the specific views and not both? I have also checked the SCInsertCamera example with no success: if I open two windows with the same view, setting a camera on one of the views, will set the camera on both.

SC 2020R2

Thanks

This is by design, so you cannot use same view for multiple windows. If you want to use multiple windows, you will be able to use different views as a workaround. Let me explain about it using SCInsertCamera sample.

1.Start Smart Client.

2.Create 2 views with SCInsertCamera, click Create 1,5,1 layout.

SCInsert1

3.Send SCInsertLayout-0 to Floating window.

4.On main window, you select SCInsertLayout-1. You can see SCInsertLayout-0 on Main window and SCInsertLayout-1 on Floating Window.

5.Select a camera and set Index, then insert the camera to the index.

Thanks for your answer, Rie

My need was that I have to send a specific camera to a specific ViewAndLayoutItem in a specific Window.

I found out that:

EnvironmentManager.Instance.SendMessage(new Message(MessageId.SmartClient.SetCameraInViewCommand, new SetCameraInViewCommandData()

        **{**

        **Index = ix,** 

CameraFQID = _selectedCamera.FQID,

StreamId = streamId

        **}));**

is always sending the camera to the ViewAndLayoyutItem on the main window, while:

Dictionary<string, string> properties = new Dictionary<string, string>();

properties.Add(“CameraId”, _selectedCamera.FQID.ObjectId.ToString());

properties.Add(“StreamId”, streamId.ToString());

_currentView.InsertBuiltinViewItem(ix, ViewAndLayoutItem.CameraBuiltinId, properties);

// _currentView.Save();

is correctly sending the camera on my specific ViewAndLayoutItem in a specific Window. And that’s ok.

As you said, if I have two windows (main and float for instance) with the same view, then both windows will change the camera regardless of the selected window.

On the design choice to not being able to use same view for multiple windows, I believe that the use case to have that changed is that an operator might want to have one view on a videowall and the same view on a local monitor, while being able to temporarily change the cameras being displayed on either monitors. Useful for control rooms.

The design that views change globally is something Milestone Development spent a lot of effort in, and something that is the base for Smart Wall. It is perfectly understandable that you seek a different behavior for the use case you have, and it is then inspiring to read how you were able to get the behavior you needed.

Thank you for your feedback.