I want to know how could I create a varible in the sink triggers (On Entry) that is based on a Table. The value, I want it to be a code.
If you assign flexscript to a table cell that is does not need any external paramters then you can use the standard syntax "Table(tableName)[row][col]".
To pass in parameters, access the node of the cell and use "evaluate()" on it. ("Table(tableName).cell(row, col).evaluate(params)")
gettablecell(label(current,"ItemCounts"),item.Type,1)
For this reason, I need to specify the varible "As.Table"
The questions would be:
· Where in the triggers could I create the variable?
· How could I speccify to the trigger that is a table?
· Where could I add the code mentioned previosly in the trigger?
You don't need to create a table variable for that command. Either the label node has the correct structure for a table and the command works or it doesn't.
The non-deprecated expression would be "current.labels["ItemCounts"].as(Table).cell(item.Type, 1)". In this case the as.(Table) is needed for the compiler to recognize cell() as a valid method.
Sorry but I can't oper the files. Actually, I have the FlexSim 23.0.14 version...
I don't know if you could help me in another way.
Thanks!
Regards,
Hello @Felix Möhlmann
Thank you vey much for your detailed answer. It has been very useful.
I have some questions related to this:
Thanks a lot!
Best regards,
- The "itemcounts" label table defines how many items of each type should still be pulled.
- The items will be pulled as soon as the user event is executed. By changing when the event triggers, you can change when the pull starts. If you want to use a non-regular interval (the pull time changes depending on the day), it would probably be easier to place the code in a Custom Code activity in Process Flow instead and generate tokens to execute the code at specific times in a schedule source.
11 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved