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 > Gripes and Goodies
Downloads

Gripes and Goodies Software problems and suggestions

  #1  
Old 09-02-2008
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
 
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 345
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold
Default Global arrays declared with no o f elements only

Hi,

after I just used a global integer array with 55 elements and had to press 55 times the button to add an element and had to fill in an initial value 55 times, I´m going to post this suggestion:
Can´t we have an alternative way to declare a global array with just the number of elements we like and have the initial values optional?
I think that would save much time since initializing an array with a loop is much more comfortable than filling each value manually.

Thanks

Ralf aka Ralle
Felxsim Germany
  #2  
Old 09-02-2008
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

If you want to initialize your array using a loop in code instead of manually in the GUI, you can just look at the code for the Add button and steal it. (By using the right click option View > Explore Structure.)

treenode arraylist = node("/1/GlobalVariables/variable1/3",model());

for(int r=1;r<=55;r++)
{
nodeinsertinto(arraylist);
nodeadddata(last(arraylist),DATATYPE_STRING);
setnodestr(last(arraylist),"1234");
}


Anything that any GUI does in Flexsim is visible to the user to take that code and put it to work in whatever way you need.
The Following 3 Users Say Thank You to Phil BoBo For This Useful Post:
RalfGruber (09-12-2008)
  #3  
Old 09-12-2008
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
 
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 345
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold
Default

Phil,

of course, you are right, but this is the experienced user solution. I thought the global variables GUI was created to help less or none experienced users so I still like the idea to have another editfield were you just have to put in the number of elements for an array you want to create.

Tanks

Ralf aka ralle


Thread Thread Starter Forum Replies Last Post
Limit in the completion hints? Global Tables, Global Variables, etc.? Tom David Gripes and Goodies 6 09-09-2008 04:05 PM
size of arrays in Flexscript Steven Hamoen Q&A 13 06-23-2008 01:04 PM
Using multi-dimensional arrays with flexscript Cliff King Tips and Tricks 0 12-15-2007 11:25 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.