Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
[ FlexSim 21.0.6 ]
How can I get the values (number of Bays, Levels, and slots) set in the Dimensions of the storage?
Solved! Go to Solution.
[ FlexSim 21.0.6 ]
How can I get the values (number of Bays, Levels, and slots) set in the Dimensions of the storage?
Solved! Go to Solution.
You can access the bays directly from the storage object.
Storage.Object Rack = <Insert reference to object here>; int BayNum = Rack.bays.length;
As each bay might have a different number of levels, you have to define for which bay you want to access the levels.
Storage.Bay CurrentBay = Rack.bays[<Index of the bay>]; int LevelNum = CurrentBay.levels.length;
In the same way, the slots are accessed through each level.
Storage.Level CurrentLevel = CurrentBay.levels[<index of the level>]; int SlotNum = CurrentLevel.slots.length;
For an example of how this is used, you can look at the code of the default options for the "Slot Assignment Strategy" of a rack or floor storage.
Hello, what should I do if I want to get the total number of slots on the Rcak?