question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Phil BoBo answered

How to print a global table to a printer?

I'm looking for a way to add a button to a dashboard that would let the user "click to print" the content of a global table containing simulation results. By "click to print", I mean similar to a browser where a new window pops-up with the print menu.

If that's not possible, I think it could be a feature to add, ie the ability to print global tables and to reference that ability in code.

Thanks a lot,

FlexSim 21.1.4
flexsim 21.1.4printing
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

Phil BoBo avatar image
1 Like"
Phil BoBo answered

FlexSim has no functions for communicating with a printer. To print directly, you would need to use C++ with the DLL Maker or Module SDK.

Using FlexScript, you could export the data to a file and then open that file in another program that can print it.

For example, you can use viewtofile() to save a global table view to a file and then rundocument() to open that file, which will open whatever program is associated with image files on your PC, likely the Photos application by default in Windows. From that application, you can print.

1624641771176.png

1624641782267.png

globaltable_viewtofile.fsm


5 |100000

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