question

Mary P avatar image
0 Likes"
Mary P asked Matthew Gillespie commented

different size of boxes

Hi

I'm trying to set different sizes of boxes according to there type. I have the sizes on GlobalTable1 and i tried to add the size in the Process flow in change visual but it's not working. Any ideas?

inventories-size-4forum.fsm

FlexSim 19.2.4
process flowboxessize of box
· 2
5 |100000

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

In the Inventories table you have 8 different types defined (1000 - 1007), but in the GlobalTable1 table you only have 5 rows defined. How do you plan to get the correct sizes from the GlobalTable1 table when they don't match up?

0 Likes 0 ·
Mary P avatar image Mary P Matthew Gillespie ♦♦ commented ·

@Matthew Gillespie

Sorry, my mistake. I added some more rows to the global table1.

26777-inventories-size-4forum.fsm

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Matthew Gillespie commented

You were most of the way there. In the Change Visual activity you were setting the item's location and not the size. So click on the drop down in the Set Location, Rotation, or Size popup and change it to Size.

I also changed the token.Type references to token.row. Your Type numbers are numbers 1000 - 1008, but what you need for these pickoptions is a number between 1-8. So I just used your row label that was already there.

sizeitems.fsm


sizing.png (16.3 KiB)
sizeitems.fsm (58.6 KiB)
· 2
5 |100000

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

Mary P avatar image Mary P commented ·

Thank you @Matthew Gillespie it does work now. Is there a way that I can use the original numbers that I had?

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Mary P commented ·

The issue is that you need to take your Type value and use that to find the right row of the Dimensions table. So you could use token.Type - 1000 for the row value, but that's the same number that your already have on the row label.

You could name the row headers of the Dimensions table with the Type values they represent and use the token.Type label to find the row that way. But that is very slow and you'd have to convert the label into a string to make it work:

Table("Dimensions")[string.fromNum(token.Type)][1]

An alternative approach would be to just add the x,y, and z columns to the Inventories table and just read those values at the same time you read the other columns.

1 Like 1 ·