question

Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico asked tannerp answered

Routes to modify information

Hi, I have several questions about routes.

Is there a command with which I can open a GUI? Note that by right clicking it throws the "Show GUI" option. Where can I find that route?

Which command is to import and export Excel files?

How can I make reference by means of a code to the path of the 3D visual of a file that I have saved in a folder? Is there a command for this?

I am looking to modify the name with which the Excel file will be saved when exporting by means of a code. How do I find the Excel Workbook path in Excel Interface> Export?

With what command can I detect the day the simulation was run? I am referring to the time that the clock of the computer marks, not to the internal clock of the run.

Can I create a TXT file by means of a code in a certain route or should the file already be created by the user in the corresponding route?

Can I take a screenshot (Capture View) by means of a command in FlexSim in relation to a Views?

FlexSim 19.0.2
guiexcel importexcel exportcapture viewtxt
capture-view.png (2.4 KiB)
export-excel.png (17.7 KiB)
3d.png (54.4 KiB)
gui.png (8.5 KiB)
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

tannerp avatar image
1 Like"
tannerp answered

Hi @Omar Aguilera Rico,

I don't think I can answer all your questions in one shot here, but I did write this script recently for another client. It basically shows an example of how to import and export to/from Excel with code. For all your other questions, you might consider using the sampling tool on the tree to get the path. Hopefully this enough to get you started.

//open excel to communicate
excellaunch();
//open specific file using full directory path
excelopen("C:/Users/tanner.poulton.FLEXSIM/Documents/Questions/mydata.xlsx");
//create new sheet in excel
excelcreatesheet("test1");
excelsetsheet("test1");
//export global table to newly created excel sheet
excelexporttable("GlobalTable1",1,1,10,2);
//close and quit excel
excelclose(1);
excelquit();
5 |100000

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