How to update/refresh dashboard view?

How to update/refresh dashboard view?

martin_k5
Not applicable
158 Views
9 Replies
Message 1 of 10

How to update/refresh dashboard view?

martin_k5
Not applicable

[ FlexSim 22.2.0 ]

Hi,

I am working with dashboard as a toolbox for controlling the model. I used the GUI Class reference to display additional parametres. The problem is when I change something (or the user) in the GUI, the change is not overwritten in the Dashboard view and I need to simply close and reopen the dashboard to view the requisted changes.


Is there any other way to make the Dashboard reload or refresh instead of closing it?


1684410603675.png

The same situation is when using combobox and trying to modify the node's values via code, but the changes do not appear until you close and reopen the dashboard.


Thank you,


Martin

Accepted solutions (1)
159 Views
9 Replies
Replies (9)
Message 2 of 10

joerg_vogel_HsH
Mentor
Mentor

Does a command of repaint do the same?

Message 3 of 10

martin_k5
Not applicable

I am not sure what you mean rigth now. I tried the following command:

treenode view = Model.find("MODEL:/Tools/Dashboards/Dashboard2");
repaintview(view);

but no change appeared.

I thinks it does not refresh the dashboard.

Thank you

0 Likes
Message 4 of 10

joerg_vogel_HsH
Mentor
Mentor
0 Likes
Message 5 of 10

martin_k5
Not applicable

It still does not help. I have a combobox and I want the add new node and set its name. Then I tried the mentioned command to see the changes but not successfully.


treenode node = Model.find("MODEL:/Tools/Dashboards/Dashboard2/DashboardCombobox334>variables/options");
nodeinsertinto(node);
setname(node.last, "test");
updatestates();

Shoud this work?

0 Likes
Message 6 of 10

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

You should instead be using getdashboardcontrol() to find the combobox:


Object dashctrl=getdashboardcontrol("myComboBox");  //myComboBox is the dashboard control ID, not the name - set it in properties
treenode newOption=items(dashctrl).subnodes.assert("test3",6);
comborefresh(dashctrl);
0 Likes
Message 7 of 10

VikSin
Not applicable

Hi Jason,

I'm replying as my colleague is offline already. We use getdahsboardcontrol but problems is still the same:

I will provide a test model below. You can see in model that when you click on AddComboOption button, you are adding options but they are not visible in dashboard. You must close it a open it again.
Also the treenode is still the same and changes only after dashboard is closed.

flexsim_combobox.fsm

0 Likes
Message 8 of 10

jason_lightfootVL7B4
Autodesk
Autodesk

I added the comborefresh command to the script above which removes the need to cycle the dashboard's edit mode.

flexsim-combobox_jl.fsm

0 Likes
Message 9 of 10

VikSin
Not applicable

thank you, this works 🙂

0 Likes
Message 10 of 10

borja_lorenzo4278
Enthusiast
Enthusiast

Hello

Has a solution been achieved for this query?, I don’t quite understand the shared model. I have a similar problem and have posted a question with an attached model. I am waiting for an update.
GUI Panel Synchronization - FlexSim Community

0 Likes