I have tried to use fileopen() and filereadline() to read data in a txt file. But it can only read first line and makes me confused. Is there any way to read complete data in txt file?
Thank you so much for your help!
I have tried to use fileopen() and filereadline() to read data in a txt file. But it can only read first line and makes me confused. Is there any way to read complete data in txt file?
Thank you so much for your help!
Text data was read or written in the past line by line. This hasn't changed. You read the first line with filereadline(), the second text line with a second filereadline() and you read the complete text file line by line each line with the filereadline command until you find endoffile().
Read strings separated with a semi-colon contains an example to read a complete text file to identify string parts and print them to the output console. What you actually need is repeat filereadline() until you get to endoffile().
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved