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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Łukasz E, was Paula LG's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Paula LG avatar image
0 Likes"
Paula LG answered

Hi,

You could write this code inside the button:

int value=switch_hidecontents(object,-1);
switch (value){
case 1: switch_hidecontents(object,0);
break;
case 0: switch_hidecontents(object,1);
break;
}

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.