How to extract numbers from .txt files in iLogic?

How to extract numbers from .txt files in iLogic?

Anonymous
Not applicable
619 Views
2 Replies
Message 1 of 3

How to extract numbers from .txt files in iLogic?

Anonymous
Not applicable

Hi,

 

I used the Cross Section Analysis tool in Inventor and exported the values to a .txt file. How do I extract the numbers using iLogic so I can define them as parameters?

 

I have some code started, but need help finishing.

 

Thanks.

Code.PNG

Text File.PNG

0 Likes
620 Views
2 Replies
Replies (2)
Message 2 of 3

Udo_Huebner
Mentor
Mentor

Your "CrossSection1.txt" file does not contain values separates by Comma. Spaces or Tabs are more likely. 

To get specific values, access them with the appropriate index

https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.split?view=netframework-4....

 

 

Gruß Udo Hübner (CAD-Huebner)
Message 3 of 3

Anonymous
Not applicable

Thanks for your help. Based on the link you gave me, I should be able to split the string. I looked more on the Visual Basic website, and there doesn't seem to be any information on how to get numbers from text files (or indexing as you mentioned). Do you know of any sources? This is my first time using iLogic, so I am not too familiar with all its functions and capabilities. 

 

0 Likes