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 1
- 
            Hey David,
 Thanks for the example code, it works great! I have already updated my app.
 BR,
 Newbe
 0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 363 IRC5
- 80 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 853 RAPID Programming
- 31 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings
