question

Jay Khedekar avatar image
0 Likes"
Jay Khedekar asked Jay Khedekar 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 Khedekar 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 Khedekar avatar image Jay Khedekar commented ·
Thank you!
0 Likes 0 ·