question

Abhay Bajpai avatar image
0 Likes"
Abhay Bajpai asked Jason Lightfoot edited

To see the table created by Flex Script

How do I get to see a table generated by the code written in Flex Script to see what it looks like?

Circled is the code that creates the table called "result". I want to print it in the output console to see its content for debugging purposes.

Champion Homes Assembly Making Replica (2)_3.fsmscreenshot-2023-05-30-115035.png

FlexSim 23.0.8
sqltables
5 |100000

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

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot edited

The easiest way is to create a temporary global table and clone the result to it.

result.cloneTo(Table("temp"))


· 8
5 |100000

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

Abhay Bajpai avatar image Abhay Bajpai commented ·
Thank man! That worked!
1 Like 1 ·
Abhay Bajpai avatar image Abhay Bajpai commented ·
Jason. I noticed that after the "temp" table was deleted by me, it did not create it again. Do we know why this happens? Is it because the code you wrote in "writeStationMaps" custom code does not run?
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Abhay Bajpai commented ·
Deleted or cleared? It needs the table to exist to write to it. If it exists and you added the line to clone then it will write to it. Did you apply the code before closing the user command gui?
0 Likes 0 ·
Abhay Bajpai avatar image Abhay Bajpai Jason Lightfoot ♦♦ commented ·

I deleted it. So i added the table back with the name "Temp" and ran the code again. For some reason, it does not clone the data in the Temp table.


Champion Homes V1.fsm

0 Likes 0 ·
Show more comments