question

Sandeep Kumar I avatar image
0 Likes"
Sandeep Kumar I asked tannerp answered

How to locate 3D objects or process flow objects in a model?

I have a very large conveyor system model. Whenever an error is displayed, for example conveyor 95 or DP21 has an error, I am not able to locate the object without manually searching for it in the model. Similarly for objects in process flow. For example, decide~21 having label error. Please suggest a way to locate objects in flexsim for easy debugging.

FlexSim 19.2.4
flexsim 19.2.4locationdebugging
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 Matt Long edited

@sandeep_kumar.i,

I've found a handful of helpful ways to locate items in the model. I'll explain each of them here:

1) Use View -> Find Objects to search for objects by group, class, level, etc. This works in a tree window or 3D view.

2) In Process Flow, you can use the "View Activities" function.

3) Search the tree for the name.


The next two options involve code but perform the same function as the above options.

4) Use the following code to select the object for which you're looking in the 3D window. It will appear highlighted red.

switch_selected(Model.find("Source1"), 1);

5) Determine the object's location and then center the viewpoint of the 3D model window on the object's location. First right click on the 3D view and select View > Designate This View (sv)

Object locObj = Model.find("Source1");
double x = locObj.location.x;
double y = locObj.location.y;
set(viewpointx(sv), vectorprojectx(model(),x,0,0,sv.find(">viewfocus+")));
set(viewpointy(sv), vectorprojecty(model(),0,y,0,sv.find(">viewfocus+")));

I created a model that has methods 4 and 5 written out in the Script window. You can try this in your model by replacing "Source1" with another object's name.

locate 3D object.fsm


find-objects.png (8.0 KiB)
view-activities.png (39.5 KiB)
1594765785408.png (12.8 KiB)
1594765855171.png (18.4 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.