.jpg?sfvrsn=3ad09b0a_1)
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
- 10.4K All Categories
- 5.3K RobotStudio
- 346 UpFeed
- 15 Tutorials
- 8 RobotApps
- 281 PowerPacs
- 404 RobotStudio S4
- 1.7K Developer Tools
- 238 ScreenMaker
- 2.6K Robot Controller
- 246 IRC5
- 36 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 691 RAPID Programming
- 14 Wizard Easy Programming
- 101 Collaborative Robots
- 3 Job listings