question

Victor Alejandro HT avatar image
0 Likes"
Victor Alejandro HT asked tannerp commented

Showing 2 different dashboards in 3D environment

Hi all,

I tried to show 2 different dashboards in 2 different planes, based on this answer (https://answers.flexsim.com/questions/35343/show-state-pie-and-statistics-in-3d-model.html?childToView=48503#answer-48503) and the proof on concept developed by @Allister Wilson

I created 2 PF logics in order to capture the image of Dashboard 1 (WIPvsTime) and Dashboard 2 (Throughtput).

I also changed the Custom code of the Process Flow Throughput as shown:

treenode view = node("VIEW:/2>Documents/Dashboard/1+/~/GraphPane1/1/1");
repaintview(view);
viewtofile(view, modeldir() + "test2.png");
unloadimage(gettextureindex(modeldir() + "test2.png"));
int newindex = loadimage(modeldir() + "test2.png", modeldir() + "test2.png");
setobjecttextureindex(model().find("Plane2"), newindex);

but I can not make that every single plane shows different Dashboards, the 2 planes show the same Dashboard and some times the second got black. I tried changing the string of the node but perhaps I am not refering the proper path. I attached the model. Any helped is very welcomed.

vr-2-dashboards.fsm

Thanks in advance.

Alejandro

FlexSim 19.2.3
FlexSim 19.1.2
dashboardsvr
1.png (172.9 KiB)
vr-2-dashboards.fsm (34.3 KiB)
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

·
tannerp avatar image
1 Like"
tannerp answered tannerp commented

Hi @Victor Alejandro HT,

The path for your "treenode view" was not returning anything as I was debugging your model. I think this is why it wasn't able to do both at the same time. Everything else looked good, though.

This is a delicate operation and is not robust enough that it works consistently, but I was able to get both dashboards to work simultaneously. Here's the updated model:

2-dashboards.fsm


both-dashboards.png (133.5 KiB)
2-dashboards.fsm (33.5 KiB)
· 3
5 |100000

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

Victor Alejandro HT avatar image Victor Alejandro HT commented ·

Thank you for your support @Tanner Poulton I knew that the path was wrong but I wasn´t able to find out which one was the correct one. For this model the path is valid, but this was just the test in order to implement it in my big one. Do you know what the logic to determine the proper path is?. For the dashboard the path is:

treenode view = views().find("active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/SplitterYPane/TabPane~2/TabControl/Dashboard2/GraphPanel/WebStatGraph4/Web");

and for the dashboard 2:

views().find("active/MainPanel/BackPanel/SplitterXPane/SplitterYPane/SplitterXPane/SplitterYPane/TabPane/TabControl/Dashboard/GraphPanel/WebStatGraph132/Web")

How did you find out the paths? ( WebStatGraph4/Web or WebStatGraph132/Web=

For any other model will be the same Path for any Dashboard and Dashboard2, perhaps is a simple question but I will be great to know.

One again Thanks.

Alejandro

0 Likes 0 ·
Victor Alejandro HT avatar image Victor Alejandro HT commented ·

Ok now I believe I know how to find the path.

0 Likes 0 ·
path.png (81.4 KiB)
tannerp avatar image tannerp Victor Alejandro HT commented ·

The easiest way to find a path is to use the eyedropper tool.

Looks like you've figured it out, though.

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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