Idea

Jason Merschat avatar image
0 Likes"
Jason Merschat suggested Phil BoBo edited

Assign flexscript data type on import

Create a simple method (or self-recognition) to import data as FlexScript type on import. I am running several scenarios where the distributions are updated outside of FlexSim and imported through Excel interface. Every time I import, I have to update the fields as FlexScript before running the scenario.

flexscriptdata type
· 5
5 |100000

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

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

You can use the executeCell() command to execute a string datatype cell as FlexScript:

Table("GlobalTable1").executeCell(1,1);

You can also edit the Post Import Code to automatically toggle the cells in a certain column to be FlexScript rather than doing it manually:

Table table = Table("GlobalTable1");
int col = 2;
for (int row = 1; row <= table.numRows; row++) {
	switch_flexscript(table.cell(row, col), 1);
}
buildnodeflexscript(table);
3 Likes 3 ·
Kari Payton avatar image Kari Payton Phil BoBo ♦♦ commented ·

Can you explain how to do this for switching to numerical and text? I looked up "switch_numerical" or "switch_text" in the command helper but didn't find these functions. @phil.bobo

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Kari Payton commented ·
table.cell(1,1).dataType = DATATYPE_NUMBER;
table.cell(1,1).dataType = DATATYPE_STRING;
3 Likes 3 ·
Show more comments

No Comments

·

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.