question

Jay K9 avatar image
0 Likes"
Jay K9 asked Jay K9 commented

How do I get the current Z level of the elevator?

I am trying to create a logic where I wanna check if the elevator is at Floor 1, which is Z level 0. How can I reference the current Z level of elevator in FlexScript?

FlexSim 21.1.5
flexscriptelevator
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

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jay K9 commented
Object elev=Model.find("Elevator1");
updatelocations(elev);
return elev.location.z;

If you need the top of the platform you might use something like this:

elev.getLocation(0.5,0.5,1).z;  //centre top position's value in z.
· 1
5 |100000

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

Jay K9 avatar image Jay K9 commented ·
Thank you!
0 Likes 0 ·

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.