So, I created a Global Variable that I want to assign to a cell on a Global Table, but the only options that show up are: Assign Number Data and String Data. Can you help me? ~The variable is an integer.
So, I created a Global Variable that I want to assign to a cell on a Global Table, but the only options that show up are: Assign Number Data and String Data. Can you help me? ~The variable is an integer.
If you Global Variable is an integer it is a number so you can simply use;
settablenum( "tablename", rowno, colno, GlobalVariableName )
I assume by "assigning a global variable to a table cell" you mean that you want the value in the table cell to automatically change when you change the global variable? Because that is not possible. What you can do is use the settablenum command as demonstrated by Steven, but you would have to do it on reset and every time you change the variable.
Alternatively, you could make the table column string data, and read it out with executetablecell (or use the 'Automatic' option in Process Flow).
An alternative method would be to make the global variable a tree node type that points to the cell in the global table. You can then use getnodenum(GlobalVariableName) and setnodenum(GlobalVariableName, Value) to get and set the value. This method is not as smooth when getting or using the global variable in a function but it does eliminate the need for a second command call to set the value of the table each time you change the global variable.
6 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