question

Łukasz E avatar image
0 Likes"
Łukasz E asked Jeanette F commented

Dashboard button show/hide content

Is it possible to have a button or a checkbox that after clicking it will hide or show contents of objects in the model?

The case is that i have a button in one of the dashboards, because this model wil open via webserwer. I want to hide or show content to have options to show client simulation model with all 3D objects and not focus on the simulation itself, but on the other hand i want to hide all contents for my symulation to run a little bit faster to generate plots in the dashboard.


FlexSim 21.1.5
dashboard buttonhide and unhide objects
· 1
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

Paula LG avatar image
0 Likes"
Paula LG answered

Hi,

You could write this code inside the button:

  1. int value=switch_hidecontents(object,-1);
  2. switch (value){
  3. case 1: switch_hidecontents(object,0);
  4. break;
  5. case 0: switch_hidecontents(object,1);
  6. break;
  7. }

This code is for a singular object but it can be adapted to use it, for example, with groups.

You can check this command and many others on this link: https://docs.flexsim.com/en/21.1/Reference/CodingInFlexSim/CommandReference/CommandGroups.html#switch_hidecontents

I hope it helps!



5 |100000

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