question

Sri_vikas K avatar image
0 Likes"
Sri_vikas K asked Joerg Vogel edited

Code lines for doing animation.

Hi Cammunity.

In my model i am using a code to make an object run an animation.

if (buttonNum == 8)

{

Model.find("Door");

}

if (buttonNum == 9)

{

Model.find("Door");

}

What is the complete code lines for this.

Thankyou

FlexSim 23.0.3
using code
· 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.

1 Answer

Felix Möhlmann avatar image
2 Likes"
Felix Möhlmann answered Felix Möhlmann commented

In your screenshot you are mixing up two ways to access the animation.

You can either use the old commands (startanimation, stopanimation, ...) which you can look up in the command help within FlexSim directly (Help -> Command Helper).

1676112634526.png

Or you the newer "animations" class. Information about that is available in the class reference section of the online manual.

https://docs.flexsim.com/en/23.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Data/Animation.html

If you need to look up syntax in general, those two sources will help you in most cases.


1676112634526.png (23.7 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.