View Single Post
  #2  
Old 12-17-2012
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: 1172
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

In prior versions of FlexSim, you couldn't pass arrays in Flexscript. You had to store information in nodes in the tree and pass a reference to the parent node in order to get more information passed between functions.

In version 6.0.2, it appears as though returning arrays in a Flexscript user command somewhat works. I tested creating an intarray of size 500 and return it from a user command. When I try to access the array from within the script window, indexes 0 and 1 return bad values, but 2-500 work properly.

I suspect this development was started but not finalized, which is why it never appeared in release notes. I will discuss this with the rest of the development team to figure out what the plan is with array return values and parameters in Flexscript.

I suggest continuing to store information in nodes in the tree and pass a reference to the parent node in order to get more information passed between functions.

Last edited by Phil BoBo; 11-19-2014 at 05:52 PM.
Reply With Quote
The Following 8 Users Say Thank You to Phil BoBo For This Useful Post:
Carsten Seehafer (12-18-2012), Esther Bennett (12-18-2012), Hao Zhou (12-18-2012), Jason Lightfoot (12-17-2012), Jörg Vogel (12-18-2012), Luciano (12-18-2012), Steven Hamoen (12-18-2012), Vadim Fooks (12-17-2012)