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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2011
Nischith Kashyap's Avatar
Nischith Kashyap Nischith Kashyap is offline
Flexsim User
 
Join Date: Nov 2010
Location: Wollongong, Australia
Posts: 51
Downloads: 26
Uploads: 0
Thanks: 19
Thanked 0 Times in 0 Posts
Rep Power: 116
Nischith Kashyap is on a distinguished road
Default Storing an Array in the tree structure.....

Hello

We would like to store an array in the tree structure at a particular place, and we are just wondering if there is any specific command to do so.......
We are able to read from the database with the following code.



stringarray test = makearray(86400);
for(int i = 1; i <=86400; i++)
{
test[i] = dbgettablestr(i,2);
}
dbclose();

We would like to store this array in NN1>Table1/1 which is a new node we created in the tree structure. What we are trying to do is, later on when our model runs, on accessing 1, we would be able to get our array.

Thanks
Reply With Quote
  #2  
Old 03-24-2011
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: 682
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

Hi,

Why don't you make a global array? (Tools -> Global Variables) then you can use it througout your code where ever you want.

Other option is to not use an array but simply use a treenode structure to begin with. Create a label and using the table commands (settablesize etc) create a table to store your data.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
array size juan alberto Q&A 0 12-21-2010 03:03 AM
Storing a C++ class pointer in a flexsim object Steven Hamoen Q&A 2 04-15-2010 09:19 AM
data structure juan alberto Q&A 1 09-23-2009 05:21 AM
Can't get value from global array Joe Allen Q&A 7 10-30-2008 09:06 AM


All times are GMT -6. The time now is 09:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.