ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 03-06-2015
ardodul ardodul is offline
Flexsim User
 
Join Date: Apr 2012
Posts: 10
Downloads: 25
Uploads: 0
Thanks: 6
Thanked 3 Times in 2 Posts
Rep Power: 99
ardodul is on a distinguished road
Default Export Bundle data

Hello,
Can anyone tell me how to export a bundle data to csv?

Best Regards,
Ahsanur Rahman
  #2  
Old 03-06-2015
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Hello Ahsanur,

If you are trying to export the data from a specific dashboard widget to CSV file you can just right click on that specific widget and you have the option export to csv file.
If you want to point to data node you can export by
MODEL:/Tools/Statistics/WidgetName>variables/data
  #3  
Old 03-06-2015
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

You can try exportdataset(<node>,<filename>,DATATYPE_BUNDLE)

Last edited by Jason Lightfoot; 03-06-2015 at 10:44 AM.
The Following 3 Users Say Thank You to Jason Lightfoot For This Useful Post:
sagar bolisetti (03-06-2015)
  #4  
Old 03-06-2015
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

There is currently no function available to export a bundle. So you have to do it yourself. There are 2 simple approaches you can use:
1. Loop through the bundle and use the fileopen and pft functions to write your data to a file directly.
2. Loop through the bundle and fill a global table and then use exporttable to export it.

Both require a little work but it is not that complicated.


Sorry just see that I stand corrected. Thanks Jason, but my solutions are still valid!

Last edited by Steven Hamoen; 03-06-2015 at 08:58 AM.
The Following 3 Users Say Thank You to Steven Hamoen For This Useful Post:
sagar bolisetti (03-06-2015)
  #5  
Old 03-06-2015
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Sorry i misunderstood your question.Here are some threads discussed on this topic
http://www.flexsim.com/community/for...ead.php?t=2203
http://www.flexsim.com/community/for...ead.php?t=2774
The Following User Says Thank You to sagar bolisetti For This Useful Post:
ardodul (03-06-2015)
  #6  
Old 03-06-2015
ardodul ardodul is offline
Flexsim User
 
Join Date: Apr 2012
Posts: 10
Downloads: 25
Uploads: 0
Thanks: 6
Thanked 3 Times in 2 Posts
Rep Power: 99
ardodul is on a distinguished road
Default Please provide an example

Hello,
I have tried this following option
1. Loop through the bundle and use the fileopen and pft functions to write your data to a file directly.

It's not working nor it's giving me an error. Hence, I am providing an example data and my scripts. Can you tell me what I am doing wrong?

Example data:
7 entries, [StationName, Date, Time, Inventory, WIP, WIP_Chart]
0 ["STA000", "2/27/2015 08:00:12", "08:00:12", 0, 1, 1]
1 ["STA000", "2/27/2015 08:07:11", "08:07:11", 0, 1, 0]
2 ["STA000", "2/27/2015 08:07:12", "08:07:12", 0, 0, -1]
3 ["STA000", "2/27/2015 09:34:08", "09:34:08", 0, 0, 0]
4 ["STA000", "2/27/2015 09:34:09", "09:34:09", 0, 1, 1]
5 ["STA000", "2/27/2015 09:40:08", "09:40:08", 0, 1, 0]
6 ["STA000", "2/27/2015 09:40:09", "09:40:09", 0, 0, -1]

Script:
string columnname1 = getbundlevalue(so(),1,"StationName");
pt(columnname1);pr();
if(fileexists("test.csv"))
{
pt("I have my file");pr();
fileopen("test.csv", "a");
fpt(columnname1);fpr();
//fpr();
fileclose();
}

Tags
bundle, export


Thread Thread Starter Forum Replies Last Post
Export all Dashboards Sebastian Hemmann Q&A 2 12-25-2014 04:44 AM
Experimenter Export Susan Pevovar Q&A 6 06-02-2011 05:20 PM
How to export model data to excel? zhang xin Container Terminal (CT) Library 3 04-16-2011 01:21 AM
statistics cannot export to excel or csv zhang xin Container Terminal (CT) Library 2 03-12-2010 08:01 AM
Export of statistic data from Experimenter Matthias Hofmann Q&A 1 11-04-2008 09:05 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.