question

Julio R avatar image
2 Likes"
Julio R asked Julio R commented

Adding sound

I'm trying to play a sound in a custom code in process flow. I have a WAV file and I tried different commands but I haven't been able to do it.

Is there a easy way to play a sound with a command in process flow?

FlexSim 18.0.2
sound
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

·
Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Julio R commented

If you open the Command Helper (Help > Command Helper) and search for sound you'll see a bunch of sound commands. The soundplayfile should do the trick:

soundplayfile(activedocumentnode(), "C:\\Users\\matthew.gillespie\\Desktop\\sound.wav", 1);

Try downloading and unzipping this file (sound.zip) and then changing the path in the code above to point to the location of sound.wav.

sound.zip


sound.zip (22.8 KiB)
· 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.

Julio R avatar image Julio R commented ·

Thank you, that's exactly what I needed.

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.