ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
||||
|
||||
importtable() csv-file
I use the advanced-window of the global tables to import a csv-file (which I previously exported from flexsim).
The number of columns become much more then in the original csv-file. It works fine with a table with a few rows, but if the file becomes longer, more empty columns are created. When loading more then 10000 rows, Flexsim hangs. Any suggestions or work-arounds?? regards, Lolke |
#2
|
|||
|
|||
Hi Lolke,
i am not sure if this is the same problem, but maybe it is. To import ASCI Files we have written a import logic. The problem in this case was that the logic everytime add a new row in the table, if its found a new line in the ASCI File. If you have a File with less than 1000-2000 lines, its no problem, but if you increase the lines than Flexsim seems like hanging up. A few minutes later change it from "Hang up" to normal and the import was complete. So my opinion was, adding nodes take a lot of time. What i have done is, i expand the logic to count the lines, set the global table to the size i want and then copy the data out of the ASCI File. This decrease the amount of time for each import from 10-30 min to 10-15 sec. (Files with 18000-25000 lines). The only defect of this is the c code you need for Hope this helps a little bit, and sorry for the bad english ^^ Tobias |
#3
|
||||
|
||||
Thanks for your answer Tobias!
I was thinking at importing it line by line as well. However I do not want to use C++ Does anyone know if there is a bug in importtable??? |
#4
|
||||
|
||||
There will be more flexscript commands available in v4.3 to work with text files. In the mean time, the only text file read command available is importtable and importdataset, and it looks like it has bugs. I'll add this to the Known Issues list.
|