I want to check if a column in a global table with a certain name exists, if not create that column.
Thanks,
Manuel.
Hi @Manuel Sinco,
I used the getColHeader() function to parse through the column header values to match to a desired name. If the name is not in any of the columns, a new column with the desired name is added. Here's a model with the code you can test. Simply press Play on the Script and watch it add "Col 5" to GlobalTable1.
Thanks Tanner, I thought about it before posting the question. I was thinking about a command referring maybe to the tree to assert something, but if it does not exist is okay.
I accept the answer based on that someone can use it.
Thank you.
13 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