is it possible to export your machine status to an excell workbook in real time?
is it possible to export your machine status to an excell workbook in real time?
You can export data to an (unopened) excel file at any point during the model run. You could for example use the following code in the On State Change trigger of a fixed resouce.
excelopen("C:/Users/felix/Downloads/export-test.xlsx");
excelsetsheet("States"); excelwritestr(1, 2, current.as(Object).stats.state().getCategoryName(toState)); excelclose(1);
Thank you so much for the reply. However, as soon as I put this code on to the flexscript of one of the objects the simulation crashes and would not run smoothly.
do you have any idea why that happens?
You could improve this by only opening the file at the run start and only saving it at the end, but that would mean you couldn't access the file while the model is running at all.
Why do you even want to write live values to Excel? If you want to communicate with other software there are better methods. Both direct (emulation connections) or indirect (via a shared database).
11 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