How to display ListView (Logs) from DotNet (C#) Method
nimpsch
✭
in ScreenMaker
Hi!
I am trying to develop a Screenmaker application for the flexpendant. One requirement is to display all errors in a ListView, which the user is able to modify (delete, deleteAll etc.) The default LogView from the flexpendant is not an option, since it should display only the errors by default (and it should be accessible from our custom application).
I am using a button, which will trigger a DotNet Method. This method should display a ListView on the flexpendant.
Here is my current DotNet method, which should display a ListView on the Flexpendant:
Here are some other issues I found while devolping the application:
Thank you very much!!
I am trying to develop a Screenmaker application for the flexpendant. One requirement is to display all errors in a ListView, which the user is able to modify (delete, deleteAll etc.) The default LogView from the flexpendant is not an option, since it should display only the errors by default (and it should be accessible from our custom application).
I am using a button, which will trigger a DotNet Method. This method should display a ListView on the flexpendant.
Here is my current DotNet method, which should display a ListView on the Flexpendant:
public static void ShowErrors() { NetworkScanner ns = new NetworkScanner(); ns.Scan(); ControllerInfo[] listofcontrollerInfos = ns.GetControllers(); m_Controller = ControllerFactory.CreateFrom(listofcontrollerInfos[0]); EventLogCategory[] _cats = m_Controller.EventLog.GetCategories(); ListView listView = new ListView(); ListViewItem _item = null; foreach (EventLogCategory _cat in _cats) { foreach (EventLogMessage _msg in _cat.Messages) { _item = new ListViewItem(_msg.SequenceNumber.ToString()); _item.SubItems.Add(_msg.Number.ToString()); _item.SubItems.Add(_msg.Title); listView.Items.Add(_item); } } listView.Show(); }<br>
- Is this the correct way on how to connect to the local controller? I didn't want to use the PC SDK but I saw no other option.
- The listView.Show(); does nothing. I know that some logs where found but the listVIew is not shown on the flexpendant.
Here are some other issues I found while devolping the application:
- Is there a way to add a linebreak in a button without modifing it's size? didn't work.
- Why is the SelectedIndexChaned event for a combobox not triggered with the most recent index, but the previous one? We had to use an ActionTrigger to get the current index.
Thank you very much!!
0
Answers
-
Hello there,
Have you seen this post: https://forums.robotstudio.com/discussion/12056/pc-sdk-examples—Maxim RiabichevPC Software Support Engineer0 -
Maxim Riabichev said:Hello there,
Have you seen this post: https://forums.robotstudio.com/discussion/12056/pc-sdk-examples
First of all thank you for trying to help. I haven't seen this post, but it doesn't really help me, since I want to display this ListView on the Flexpendant and not on a custom PC-application and I actualy don't want to use the PC SDK. Is it even possible to do what I want with Screenmaker?0 -
Hello!!
I have a silimar problem... Did you guys managed to do it??
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 312 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 793 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings