Hey guys :)
I have a problem , i want to, for example multiply in a new row the variable(Laenge*Breite*Hoehe) like in excel , is this possible ? (Can i add formulas)
Thanks
Hey guys :)
I have a problem , i want to, for example multiply in a new row the variable(Laenge*Breite*Hoehe) like in excel , is this possible ? (Can i add formulas)
Thanks
You can put a formula in a cell, but it won't display the calculated value - you'll only be able to evaluate the formula and get the calculated value when you ask for it.
If you set the datatype of the column to FlexScript you can then enter a formula in FlexScript:
Table table = Table("GlobalTable1"); return table[1][1] * 10;
Then you can get the value out like this:
Table("GlobalTable1")[1][2]
That will execute the code in that cell and return the calculated value.
Or in one line:
Table("GlobalTable1")[1][1] * 10
Unfortunately FlexSim does not support formulas in tables. You would have to write code somewhere outside of the table to update the table's cells. Or if you only need it on reset, you could use the Global Table's On Reset trigger.
If you'd like to see this feature added to FlexSim you could repost this as an Idea in the Development space. This allows users to vote on the idea and tells the developers which ideas are popular for future releases.
Thanks for your help :) can you explain me the Global Table's On Reset trigger a little bit better please ?
I will look forward to do that !
When you hit the Reset button and reset your model, the Global Table will fire its On Reset trigger. There are a few pick options available for clearing data in the table or you can write your own custom code. If you open the code you'll see that current references the table, so you can write code like:
Table current = param(1); //Table node current[1][3] = current[1][1] * current[1][2];
And if you want to do this for all rows, add a loop:
Table current = param(1); for(int row = 1; row <= current.numRows; i++) { // Multiply columns 1 and 2 and store the result in column 3 current[row][3] = current[row][1] * current[row][2]; }
9 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