- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is more of an event handler question.
I'm looking for a way to simply click on a 3D prop (like a cube or a sphere or plane or cylinder) in a 3D view, and have it fire a trigger that will run a chunk of FlexScript.
I'm not referring to the GUI tools already available in FlexSim. Just simply clicking on a FlexSim 3D object. It would be as if there were an object trigger called OnClickMouse or something like it, which would fire the FlexScript like any other simulation event-driven trigger. Except that the mouse click of course, would be considered an external event to the running of the simulation engine, injected into the running Event List at the moment the mouse is clicked.
Almost like the OnDraw trigger, but it would be proactive, not reactive.
ProcessFlow almost has something like it, but not quite. There is essentially a "listener" Event Triggered Source that causes a token to be released when something (like On[something]) happens to a 3D object. However, that "something" doesn't include a mouse button click.
I do have FlexScript that when run, will toggle the visibility of conveyor legs. Currently I can easily turn conveyor legs on and off with a simple binary 1 or 0 (or check/un-check) via the standard Parameters table (or a Parameters Dashboard). That works well, but to toggle back and forth you have to go to the Parameters dashboard, then back to the 3D view.
It would be clever if there was a way to simply click on an object in 3D, essentially using it as a GUI trigger, to run my same "conveyor legs on/off" FlexScript. The benefit being that you remain in the 3D view.
This could also lead to a future suggestion for FlexSim to create a simple set of 3D GUI objects that simply fire a FlexScript trigger to do something when clicked on.
By the way, removing all conveyor legs simply makes it a lot easier to see the routing of conveyors when building them, as well as demonstrating them to people. Sometimes there's so many multiple-level conveyors in our models going every which way, that the 3D view becomes a thick forest of vertical gray Unistrut legs. Removing the legs (setting all their lengths to 0 in a group loop) works really well, and also seems to improve animation - things seem to move more smoothly when the graphics subsystem does not have to render all those legs every frame.
Thank you for any hints.
Solved! Go to Solution.