OK. Here is an actual VBA macro example which gets these directories, then iterates through them, checking if they are text files, then adds their names to a Collection. I have my iLogic Configuration settings set up so that my external rules use the ".txt" file extension, so the File.Type check seems to work OK for me, but if you are using a different extension, I am not 100% sure if that filter will work for you. They are all essentially just text files, but there are 3 different possible file extensions you can choose from. Then it reports how many if found. I have included several other MsgBox lines in there at certain points, as data feedback, but left them commented out, because depending on how many directories there are and how many files it finds, that could be a ton of messages you would have to click through. I'm sure this code could be improved upon, or modified for more specific uses, but this should get you started at least. I did not continue to show a message for each file's name, because for me that could potentially go into the thousands of pop-up messages. For now it just reports on quantities.
Sub GetListOfExternalRules()
Dim iLogicClassIDString As String
iLogicClassIDString = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}"
Dim iLogicAddIn As Inventor.ApplicationAddIn
Set iLogicAddIn = ThisApplication.ApplicationAddIns.ItemById(iLogicClassIDString)
If Not iLogicAddIn.Activated Then iLogicAddIn.Activate
Dim oAuto As Object
Set oAuto = iLogicAddIn.Automation
Dim oDirs As Variant
oDirs = oAuto.FileOptions.ExternalRuleDirectories
If UBound(oDirs) = 0 Then
Call MsgBox("No directories found.", , "")
Exit Sub
End If
'Call MsgBox(UBound(oDirs) & " directories found.", , "")
Dim i As Integer
Dim sDir As String
Dim FSO As Scripting.FileSystemObject
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim oCol As New Collection
For i = 0 To UBound(oDirs)
sDir = oDirs(i)
'Call MsgBox("sDir = " & sDir, vbInformation, "External iLogic Rule Directory")
Dim oFolder As Scripting.Folder
Set oFolder = FSO.GetFolder(sDir)
If oFolder.Files.Count = 0 Then GoTo NextFolder
'Call MsgBox("There were " & oFolder.Files.Count & " files within the following folder:" & vbCrLf & oFolder.name, , "")
Dim oFile As Scripting.File
For Each oFile In oFolder.Files
If oFile.Type = "Text Document" Then
Call oCol.Add(oFile.name)
End If
Next oFile
NextFolder:
Next i
Call MsgBox("There were " & oCol.Count & " total external iLogic rules found.", vbInformation, "")
End Sub
By the way...just in case you were not aware of this, the iLogic Configuration settings can be found on the Tools tab > Options panel (may have to expand the panel to see it) > iLogic Configuration, which opens a dialog labeled "Advanced iLogic Configuration", similar to the image below.

Wesley Crihfield

(Not an Autodesk Employee)