question

Stan Davis avatar image
0 Likes"
Stan Davis asked Stan Davis commented

How to Get Slot Padding Values Via Code ?

How do I retrieve a slot's padding values in code?? I would like to calculate a slot's available space by subtracting its padding volume from its physical size. Thanks.

FlexSim 22.2.2
slot sizeslot space
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Stan Davis commented

There are several properties on the Storage Object that you can get by using the getProperty() method. For example, to get the slot padding on the left side:

Storage.Object rack = Model.find("Rack1");
return rack.getProperty("SlotPaddingLeft");

The other slot padding properties are SlotPaddingRight, SlotPaddingTop, SlotPaddingBottom, SlotPaddingBack, SlotPaddingFront.

If the slot padding value is uniform across the storage object it will return a single number value. However, if it is not uniform you'll get an array of some sort depending on how uniform the padding value is within a bay/level.

For example, if it's uniform within each bay (every slot in Bay1 has left slot padding of 0.25 but every slot in Bay2 has 0.5 ) it would look like:

[0.25, 0.50]

If you had two levels and Level1 had 0.5 and Level 2 had 0.25 it would look like:

[[0.50, 0.25], [0.50, 0.25]]
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Stan Davis avatar image Stan Davis commented ·
Matthew, exactly what I was looking for. Thank you!! - Stan
1 Like 1 ·