question

sachin tandulkar avatar image
0 Likes"
sachin tandulkar asked Steven Hamoen answered

Get Cell values by calling Header

can we pull the values of a particular cell in a table by using its header names.

PartNo M1 M2 M3
A 10 24 13
B 20 55 15
C 30 25 22

so if from the above table if I want to pull the values from Partno C and Machine M3 intersection. I can do it by using a for loop, but if there is more efficient way to do that, please let me know.

I am expecting something like

int ct=gettablenum("CycleTime", rowno by using row header name, col num by using column header).

I am not able to figure out how to get the parameter 2 and 3 in the above function. Please let me know.

Choose One
table
5 |100000

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

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered

Currently, this is not possible and some modelers get around it by making macros for the table headers:

#define CYCLE_TIME_HEADER 3

int ct = gettablenum(table, 1, CYCLE_TIME_HEADER); 

This will be a new feature in FlexSim 2017 though!

5 |100000

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

Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered

@sachin tandulkar This could ofcourse also be done by using Flexsim's SQL engine and make a query: Something like: "Select M3 From Table where PartNo = C"

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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