Changing Flypath view by simulation time or On event

Changing Flypath view by simulation time or On event

sakamoto_ryosuke
Collaborator Collaborator
73 Views
5 Replies
Message 1 of 6

Changing Flypath view by simulation time or On event

sakamoto_ryosuke
Collaborator
Collaborator

[ FlexSim 20.1.3 ]

I understand that you can change view with Follow --> Follow Object. But could you change the view by specific simulation time or On Event? If we can, then how?

flypath_follow_test.fsm

Accepted solutions (1)
74 Views
5 Replies
Replies (5)
Message 2 of 6

cliff_king
Not applicable
Accepted solution

Here's one trick you can try. Save a bunch of views of your model using the standard properties window and then execute the following command in a trigger somewhere in your model (for example, an On Entry trigger, a Custom Activity of a Process flow, or a User Event at a particular time):

applicationcommand("changeperspview", "View 3", activedocumentnode());

Substitute the name of the desired view for "View 3" in the expression.

34782-1606783019173.png


Message 3 of 6

sakamoto_ryosuke
Collaborator
Collaborator

@Cliff King Thank you for your reply. So, I suppose you can not change object to follow with On Event? Like in the beginning the object to follow is set to Operator1, but at On Entry, change the follow to Operator2.

0 Likes
Message 4 of 6

jason_lightfootVL7B4
Autodesk
Autodesk

To do this you need to know which 3D view has to do the following. So for now right click in the 3D view and select designate this view as sv().

34808-1606914469270.png

Then in the onEntry you can use:

if (objectexists(sv()))
function_s(sv(),"follow",item);


Model attached but you'll need to set sv() when you open it.flypath-follow-test_jl.fsm


Message 5 of 6

sakamoto_ryosuke
Collaborator
Collaborator

@jason.lightfoot Wow! This is great! Thank you for the solution!

0 Likes
Message 6 of 6

jason_lightfootVL7B4
Autodesk
Autodesk

Also you can find an active perspective view using:

node("VIEW:/active>Documents/Perspective/1+/~")

which you should be able to substitute for activedocumentnode() in Cliffs code if the 3D view isn't the activedocumentnode().

0 Likes