ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
||||
|
||||
Can event nodes like "OnTimerEvent" be flexscript?
I am playing around with the createevent command. This requires creating an OnTimerEvent node for the object which seems to always be a C++ node. FlexSim is object oriented and passes the data up the inheritance levels until one of the objects handles the event. I want my object to handle my special events and pass off all of the FlexSim ones.
I have found the C++ version of the code (below), but would like to build the OnTimerEvent node as Flexscript so I do not have to compile. Is this possible and if so what is the code to achieve it? C++: o(FlexsimObject,c).OnTimerEvent(i,eventcode,eventd ata);
__________________
Travis Hill Mississippi State University |
#2
|
|||
|
|||
Yes it can be flexscript on the instance - in which case i, c and eventcode will already exist when it's called (your eventcodes should be >100). Use the inheritcode() command to get Flexsim to perform it's normal operation for codes<100.
You can use EVENT_USEROPENINPUT and EVENT_USEROPENOUTPUT without setting up the timer event node. |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
thill (10-08-2012) |
Tags |
events, ontimerevent |
Thread | Thread Starter | Forum | Replies | Last Post |
"time" event | Vic Li | Q&A | 4 | 06-12-2014 12:46 PM |
How can you have a visual tool that has a mixture of "protected" and "no select"? | thill | Q&A | 1 | 03-13-2012 12:44 AM |
C++ function "ceil" in Flexscript | Jörg Vogel | Q&A | 4 | 10-01-2008 10:17 AM |
Is it possible one object comprised of the function of "combiner" and "separetor"? | Vic Li | Q&A | 1 | 08-19-2008 04:41 AM |
about "no select" and "show parameter window from side bar" | qin tian | Gripes and Goodies | 3 | 03-21-2008 08:10 AM |