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:

  1. treenode view = node("VIEW:/2>Documents/Dashboard/1+/~/GraphPane1/1/1");
  2. repaintview(view);
  3. viewtofile(view, modeldir() + "test2.png");
  4. unloadimage(gettextureindex(modeldir() + "test2.png"));
  5. int newindex = loadimage(modeldir() + "test2.png", modeldir() + "test2.png");
  6. 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.