"MultiWindowCommand.SetViewInWindow" command is not working on Main window

Hello,

We made one side panel plugin with some defined views and giving instructions about display view on specific window.

This plugin was working very fine with the version 2022 R3 and below versions, now we have updated to version 2023 R1. In this version Main window has issues on changing layout and displaying cameras.

Main window view is not updating with the plugin instructed view, it was sticked with the already existed view and just placing cameras on this view. And also Main window closing cameras when I send instruction to update view and cameras on other secondarydisplays.

we are using this command to set view on specified window

      ClientControl.Instance.CallOnUiThread(() => EnvironmentManager.Instance.SendMessage(

                            new Message(MessageId.SmartClient.MultiWindowCommand,

                            new MultiWindowCommandData()

                            {

                              MultiWindowCommand = MultiWindowCommand.SetViewInWindow,

                              View = currentView.FQID,

                              Window = mainWindowFQID

                            })));

We try to use select window command to select main window before sending view, but it was giving exception error message.

MultiWindowCommandData data = new MultiWindowCommandData();

    data.MultiWindowCommand = MultiWindowCommand.SelectWindow;

    data.Window = null;

    ClientControl.Instance.CallOnUiThread(() => EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(

      MessageId.SmartClient.MultiWindowCommand, data), null, null));

I have tried with SCViewAndWindow sample plugin, but no use

I am sending some view to Main window with Smartclient View And Window tool from Secondary Display 1 as shown in below image

After click on Fire command button View(1*1) view is displaying on Secondary display 1 instead of Main window as shown in below image

No change in Main window(Primary display)

Thanks in advance,

Regards,

Priyanka

I cannot reproduce when I use the newest version of the sample and the newest version of the MIP SDK NuGets. As a first could you please rebuild your existing plugin while using the new NuGet and see if there is an issue then?

https://www.nuget.org/profiles/milestonesys

Hello Bo,

Thank you for the reply!

I just have downloaded latest SCViewAndWindow plugin sample from Github and also updated all NuGet packages, but still not able to set view in specified window.

It updates View on latest updated window regardless of Window FQID. Multiwindow Set view command is not updating view on specified window based on window FQID.

Regards,

Priyanka

Looking at your images on the question, it seems like you are using old version of SDK (because the newest sample looks a little bit different).

https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/scviewandwindow/readme.html&tree=tree_1.html

Can you please verify that you are using the newest sample and Nuget package? Also please make sure to clear Nuget cache in Visual Studio (Tools - Nuget Package Manager - Package Manager Settings)?

Hello Rie Kito,

I have updated SDK and Packages, still have issues with SetViewInWindow command.

package

please have a look at below images

I have 3 windows main window (Ny vy(2*3)), Secondary diaply1 (View2) and Secondary Display2 (View1)

Now, I am sending SetViewInWindow command from ViewAndWindowTool sample plugin (which is existed on Main window) to change view on Main window.

But, Smartclient diplay2 view has changed instead of Main window.

Hope you get my point. please let me know if you have any solution.

Regards

Priyanka

Thank you for the description. When we fire a command from a floating window (to Main), the main window did not change, so we could reproduce the issue. Milestone Development will start an investigation.

Hi,

I am not sending command from floating window, I have sent command from other displays(Display1, Display2..).

Hope you will get solution soon, thank you

We tested both floating and secondary and saw the same issue so please don’t worry about it. We assume that the point of the issue could be, sending the command from other displays/windows. We will get back to you when we get updates from Milestone Development.

Thank you.

Hi Rie,

Thank you for the response. We are blocked with this issue. Could you please let me know how long does it take?

Just to let you know: We have the same issue with selecting the main window resulting in a NullReferenceException. There has something been changed between versions before 23.x and the current 23.2.1, because our plugin, that now has this problem, doesn’t have it with version 22.x. The issue is blocking some important customer projects. Therefore I have to repeat Priyanka Konetis question: Could you please let us know how long it will take to fix the issue?

Hi Priyanka and Axel,

It is not possible to say when, but Milestone Development has worked on the issue. Let me get back to you when I get updates from Milestone Development.

Milestone Development solved the issue and the fix will be released on 2023 R3.

Great!

I have noticed one more issue with new version, Xprotect Smart client is not sending “Endpoint closed smartclient” message. In older version it was working fine. Please have a check on this issue.

Is it possible to share a test version?

Regards,

Priyanka

Hi Priyanka,

“Endpoint closed smartclient” could be a different issue, so can you please create a new post? We want to stick to a policy that is - one question on one post.

I have asked Milestone Development to create a hotfix for this(initial) issue. We will get back to you when we are ready.

BR, Rie

This is the official link for the hotfix -

https://supportcommunity.milestonesys.com/s/article/XProtect-Smart-Client-2023-R1-cumulative-patch-installers?language=en_US

Thank you. SetViewInWindow command is working fine in 2023 R1 with hotfix update.

Hello Rie Kito,

I have upgraded Smartclient 2023 R1 with Hotfix, SetViewInWindow is working fine but SelectWindow Command still raising Exception as shown in below image.

image.png

Regards,

Priyanka

I am sorry for delayed reply, Milestone Development will start an investigation.

Milestone Development had investigated the issue and it turned out that SelectWindow command works only for floating windows, meaning that nothing happens if you pass on the Main window to the command, so it is by design. It has not been clearly stated in the documentation, but it is fixed in 2023 R3 in MIP Documentation.

In your implementation, we suggest that you could catch and ignore that error, as the command is not meant to work on Main window anyway.