- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
iLogic How to Separate Values in a Text File?
Hi,
I am using iLogic to read a .txt file, although the file does not have comma separated values. How would I get iLogic to separate each word and number into separate variables?
I've spent a lot of time researching how to do this, but I haven't found much information. This is my first time using iLogic, so I am not familiar with a lot of its functions and capabilities. I've attached a view of the .txt file as well as my code.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Your code is fine, what happens is that you need to have well defined the separators of the strings, otherwise the task becomes more difficult. regards
oFile = "C:\Users\Sergio\Desktop\Example.txt" oRead = System.IO.File.OpenText(oFile) 'read the file oRead = System.IO.File.OpenText(oFile) EntireFile = oRead.ReadToEnd() oRead.Close() 'create aray from text info 'splitting at that comma oSplit = Split(EntireFile, " ") For Each wrd In oSplit MessageBox.Show("Word Index #" & i & " = " & oSplit(i)) i += 1 Next
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thank you for your help. I was able to get the message box to show up.
Is there a way to access those individual numbers and save them as custom iProperties?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi! I believe it should be doable. You just need to give the Custom iProperty a name and assign a value.
Many thanks!

Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer