question

Leandro Spallanzani avatar image
0 Likes"
Leandro Spallanzani asked Phil BoBo edited

Animation & Component time from table

Hi guys, it is possible to manage the time of each black point of the Animation & Component time from a table?

capture.png Thank you!

FlexSim 21.2.2
animation and component time
capture.png (94.3 KiB)
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

·
Phil BoBo avatar image
0 Likes"
Phil BoBo answered Phil BoBo edited

Attached is an example model that demonstrates how you can use Animation Variables to adjust certain component values dynamically.

animation_var_example.fsm

I added animation variables for the X, Y, and Z components of the middle keyframe in the animation.

On Entry of the Processor, I set those animation variables based on data from a global table, looking up the row by item type.

Thus, the box runs the same animation for each item, but it animates to a different position depending on the item type.


· 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.

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

Reading the question again, I'm not sure if I follow exactly what you are asking. My answer may or may not have been helpful depending on how dynamic you want the table updates to be.

If you just want to adjust the times of the keyframes once after importing table data or once on reset, then you could just write a script that sets the node values of those keyframes to the values from the table and execute that script after loading new table data or on reset.

If you are planning on adjusting the table values on the fly while the model is running, then you should use animation variables. My example showed setting the X/Y/Z components, but you could also adjust the timing component of the keyframe instead.

If you want to adjust how long the animation takes each time you run it, but the relative scale of how far apart each keyframe is stays the same, then you can simply adjust how long to run the animation when you start it. The Animation.start() command and Run Animation activity have optional parameters for specifying speed type, speed value, repeat type, and repeat value, which enable you to dynamically adjust how long an animation runs when you start running it, which can "manage the time of each black point" in the animation if that's what you mean by that.

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.