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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
Activate/deactivate Components in Animations during Runtime
Hello all
I am trying to add some visually animated components to a TE as flow item and would like to de/activate them during a simulation run. In fact, there will be male & female TE as flow items with each carrying either backbacks, trolleys, handbags, etc. or a combination of them. During runtime, the TE as flow items will get rid of them and will walk without - or a different combination. All that, I would like to define in run time. So far, I have tried several paths: The one, that presently make most sense to me is adding the additional visuals as "components" in the "Animations and Components" tab. It would now be ideal, if I could de/activate the components individually in runtime by flexscript - similar to what I can do that by clicking on the "eye" symbol in the GUI. Any hints, how I can access this parameter (or any other parameter with the same effect) of the "TE as flow item" by flexscript? Going through the Model tree did not lead to a success yet. Thank you very much for your support rgs Tom |
#2
|
||||
|
||||
You can reference component objects using the node() command, and you can hide objects using the switch_hideshape() command:
Code:
treenode component = node("/ComponentName", drawsurrogate(object)); switch_hideshape(component, 1); The FlexScript code that hides the components is in the OnEntry trigger of the Queue. |
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Thomas Wyssenbach (05-07-2016) |
Tags |
animation |
Thread | Thread Starter | Forum | Replies | Last Post |
Bone Animations | Phil BoBo | Tips and Tricks | 0 | 01-29-2016 02:55 PM |
To obtain distances travelled by components | sravan kumar | Q&A | 0 | 01-07-2015 02:28 AM |
Modifying the arrival schedule of the Source Object at runtime | Vadim Fooks | Q&A | 2 | 01-22-2013 11:52 PM |
Calling COM Components from within Flexsim | Samuel Jack | Q&A | 6 | 05-12-2011 09:36 AM |