Displaying controller Folder and Files in ListView
Newbe
✭
Comments
-
How can I get more help on BeginListDirectory and examples of using this?
0 -
Newbe,
I was also looking for the same thing and I have figured it out with help from Rob Thornton at ABB US. Thanks Rob. Below is the code that I figured out from the function that you recommended.
Public Sub LoadControllerListView(ByRef lvToLoad As ListView, ByVal sFolderToLoad As String)
Dim sFileType As String = ""
Dim aFileSystem As Controllers.FileSystemDomain.FileSystem = controller.FileSystem
Dim anArray As Controllers.FileSystemDomain.ControllerFileSystemInfo()
Dim info As Controllers.FileSystemDomain.ControllerFileSystemInfo
Try
controller.FileSystem.RemoteDirectory() = sFolderToLoad
anArray = controller.FileSystem.GetFilesAndDirectories(".")
lvToLoad.Items.Clear()
For i As Integer = 0 To anArray.Length - 1
info = anArray(i)
If info.Name <> ".." And info.Name <> "." Then
Dim item As New ListViewItem(info.Name)
lvToLoad.Items.Add(item)
End If
Next
Catch ex As Exception
End Try
End Sub
�1 -
Hey David,
Thanks for the example code, it works great! I have already updated my app.
BR,
Newbe
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings