- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create an iLogic rule which will sift through assemblies and extract information from the iProperties and export it to an excel spreadsheet.I have leveraged heavily off of a previous forum post which wants to do something similar: https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/iproperties-export-to-excel/td-p/921...
I have a number of folders that I do not want to search through in the directory, such as OldVersions in the forum post above. The rule works great for excluding folders without and spaces in the name, but it won't run if I try to search for folders with a space.
I made a test folder where I have some parts and three folders: "OldVersions", "TestFolder" and "Test Folder" each with parts in them to try debug it. Using the following lines of code will ignore the parts in OldVersions and TestFolder, and find the part in Test Folder:
For Each File As IO.FileInfo In Folder.GetFiles("*.ipt",IO.SearchOption.AllDirectories) If File.FullName.Contains("OldVersions" ) = False Then If File.FullName.Contains("TestFolder") = False Then FileList.Add(File.FullName) End If End If Next
I want to exclude all 3 folders, and tried the following lines of code:
For Each File As IO.FileInfo In Folder.GetFiles("*.ipt",IO.SearchOption.AllDirectories) If File.FullName.Contains("OldVersions" ) = False Then If File.FullName.Contains("TestFolder") = False Then If File.FullName.Contains("Test Folder") = False Then FileList.Add(File.FullName) End If End If End If Next
However this fails to run, I think the rule gets to the line with "Test Folder" then cancels. How do I define folder names with the spaces?
Thanks in advance
Solved! Go to Solution.