question

Ryosuke S avatar image
1 Like"
Ryosuke S asked Jason Lightfoot edited

Unable to select when there are a lot of setup cases in value of case

When there are a lot of value of case set and cases go out of screen, you can not review those from gui unless you open the script window.

Not many of our customer are fond of programming. Maybe we need scroll bar?

1677307472330.png


FlexSim 22.0.11
robotmotion pathsvalues by case
1677307472330.png (74.0 KiB)
· 6
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

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Ryosuke S commented

I agree with @Jason Lightfoot 's suggestion. With more than 5 or so cases, I'd say a table is easier to edit than this particular interface, especially if the result of each case is a number, rather than a code expression.

If the Type value happens to be a number, and happens to be stored in the table on that same row, you can use code like this:

  1. Table("GlobalTable1")[item.Type]["Setup"]


In some cases, however, the Type value isn't a number, or isn't the row number of the table. In that case, you can still use a Global Table. However, you have the option to store the data as a bundle. If the data is a bundle, you can also right-click on the "Type" column and choose "Index this column (unordered)"

1677702413992.png

Then, you can use code like this to get the setup time for the item:

  1. Table("GlobalTable1").getValueByKey(item.Type, "Setup")

1677702513919.png

The Table will use the index on the Type column, instead searching for the correct row. A search like that can be slow, especially if there are many rows, or the search happens many times.


1677702413992.png (49.5 KiB)
1677702513919.png (45.5 KiB)
· 4
5 |100000

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