Define slots for the rack automatic

Define slots for the rack automatic

hicham_elbaz6949F
Advocate Advocate
7 Views
7 Replies
Message 1 of 8

Define slots for the rack automatic

hicham_elbaz6949F
Advocate
Advocate

[ FlexSim 23.2.2 ]

I am trying to look for an easy way to simulate the slots in racks without taking into consideration height of the slots, for example I got two zones 1 and 2 racks each zone got two aisles and each aisle got multiple slots. is there easy way to do slots automatically without putting each rack as 3D then edit each one separately or the compare properties as well

0 Likes
Accepted solutions (1)
8 Views
7 Replies
Replies (7)
Message 2 of 8

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution
0 Likes
Message 3 of 8

hicham_elbaz6949F
Advocate
Advocate

Thank you @Jason Lightfoot if I wanna use flexscript for many racks do I have to repeat the same script many times knowing that i have differents slots and bays in racks?

  1. Object rack=Model.find("Rack1");
  2. Map dimensions=rack.getProperty("Dimensions");
  3. dimensions.NumBays=4;
  4. dimensions.BaySize=3;
  5. dimensions.NumLevels=5;
  6. dimensions.SlotsPerBay=2;
  7. dimensions.LevelSize=2;
  8. rack.setProperty("Dimensions",dimensions);
0 Likes
Message 4 of 8

jason_lightfootVL7B4
Autodesk
Autodesk
I would put the rack definitions in a table and have your script loop through that, updating /creating each rack.
0 Likes
Message 5 of 8

hicham_elbaz6949F
Advocate
Advocate

@Jason Lightfoot is there in any example for the flexscript that can be used for updating/creating the racks. I have attached a model where i have global table which contains racks and specification. model.fsm

0 Likes
Message 6 of 8

hicham_elbaz6949F
Advocate
Advocate

another point is there any way for example i would give bay number and levels plus number of slots for all racks as one number then it will automatically update the racks

0 Likes
Message 7 of 8

jason_lightfootVL7B4
Autodesk
Autodesk
Table rackdefs=Table("GlobalTable1");
for (int n=rackdefs.numRows;n>0;n--){
    Object rack=Model.find(rackdefs.getRowHeader(n));
    Map dimensions=rack.getProperty("Dimensions");
    dimensions.NumBays=rackdefs["NumBays"];
    dimensions.BaySize=rackdefs["Baysize"];
    dimensions.NumLevels=rackdefs["Numlevels"];
    dimensions.SlotsPerBay=rackdefs["SlotsPerBay"];
    dimensions.LevelSize=rackdefs["Levelsize"];
    dimensions.SlotSize=dimensions.BaySize/dimensions.SlotsPerBay;
    rack.setProperty("Dimensions",dimensions);
}
0 Likes
Message 8 of 8

hicham_elbaz6949F
Advocate
Advocate
Got it. Thank you @Jason Lightfoot
0 Likes