question

Aaron C avatar image
0 Likes"
Aaron C asked Jason Lightfoot commented

How do you get a reference to the 3D Model view?

I want to follow different objects in first-person view at different points in my Process Flow. I found a reference here

https://answers.flexsim.com/questions/45622/ser-view-on-video-recorder-as-first-person-from-op.html

in which @Jacob Gillespie mentioned:

"function_s(view, "follow", object)"
and
"function_s(view, "setFollowFirstPerson", boolean);".

This looks like what I need, but I can't figure out how to get Jacob's "view" reference.

FlexSim 19.1.0
flexscriptviewreferencefollow objectsfirst person
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

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Jason Lightfoot commented

You need to get a reference to the 3D view you want to tell to start following something. This line of code will get you the first open 3D view:

  1. views().find("active>Documents/Perspective/1+/~")

If you had multiple 3D views open and you wanted to set the follow setting on all of them you could do something like this:

  1. treenode perspViews = views().find("active>Documents/Perspective");
  2. for(int i = 1; perspViews.subnodes.length; i++) {
  3. treenode view = ownerobject(perspViews.subnodes[i].value);
  4. function_s(view, "follow", object);
  5. }
· 6
5 |100000

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