Hi,
I have developed a Plugin for Smart Client to retrieve what is on the Smart Wall, which includes the Monitor(s) the the VIewItem(s) on the Monitor. It was running perfectly on Smart Client 2017 R3, but not after we upgraded to Smart Client 2020 R2.
The main section of code handling this look as below;
private string SmartWallItemsString = "";
private void CheckSmartWallChildren(Item parent)
{
List<Item> itemsOnNextLevel = parent.GetChildren();
if (itemsOnNextLevel != null)
{
foreach (Item item in itemsOnNextLevel)
{
if (item.HasChildren != HasChildren.No)
{
SmartWallItemsString += "*"+item.Name+":"+item.GetChildren().Count + "|";
CheckSmartWallChildren(item);
}
else {
SmartWallItemsString += "::"+item.Name+":"+item.FQID.ObjectId.ToString() + "|";
}
}
}
}
private string GetSmartWallItems()
{
SmartWallItemsString = "";
var SmartWallItemsList = ClientControl.Instance.GetSmartWallItems();
SmartWallItemsString += SmartWallItemsList.Count + "|";
for (int i = 0; i < SmartWallItemsList.Count; i++)
{
CheckSmartWallChildren(SmartWallItemsList[i]);
}
return SmartWallItemsString;
}
The different results on Smart Client 2017 and 2020 are shown below:
2017:
1|*Decoder:2|*Mon1:1|::FLEXIDOME IP starlight 6000 VR (128.133.229.120) - Camera 1:ee2c36d1-27d6-4c45-9858-c0adbeaa0f7a|*Mon2:2|::FLEXIDOME IP starlight 6000 VR (128.133.229.74) - Camera 1:93beaf57-95e9-49b4-80a4-98f60beea4da|::Empty ViewItem:77e11963-9092-44fc-8dcc-517c99b4a782|
2020:
1|*Decoder:2|::Mon1:bd4c406f-001a-4e30-ab80-3225581bfc83|::Mon2:aa5a9e85-9495-42d6-8237-5fbbe5ce4419|
For better readability, I formatted the results as below:
2017:
1|*Decoder:2|
*Mon1:1|
::FLEXIDOME IP starlight 6000 VR (128.133.229.120) - Camera 1
:ee2c36d1-27d6-4c45-9858-c0adbeaa0f7a|
*Mon2:2|
::FLEXIDOME IP starlight 6000 VR (128.133.229.74) - Camera 1
:93beaf57-95e9-49b4-80a4-98f60beea4da|
::Empty ViewItem
:77e11963-9092-44fc-8dcc-517c99b4a782|
2020:
1|*Decoder:2|
::Mon1
:bd4c406f-001a-4e30-ab80-3225581bfc83|
::Mon2
:aa5a9e85-9495-42d6-8237-5fbbe5ce4419|
My finding is that Smart Client 2020 no longer “consider” the ViewItems on Monitors as children, hence no more returning the children count and children names.
Please advise on how can I retrieved the ViewItems on the Smart Client Smart Wall monitors in version 2020.
Thanks.
