Making sounds with dynamic components

This might be a waste of a new topic, I don’t know. It’s a simple question. Can the OnClick function be used to trigger the playing of a sound file in DCs? For instance, I click on this train horn and it plays an mp3 that’s internally stored somewhere?

If not, could this feature be added to DCs?

Have a play with this.

And if you get it to work please share.

I can confirm it works with 2020.

While it might be possible to add the feature to Dynamic Components, it won’t do you a lot of good if you are using SketchUp Make as indicated in your profile. Box’s suggestion is the most practical for you.

It could be possible IF the file was already on your local drive. (Ie, the Ruby API has a method to play sound files and a DC function could be written to add it as new DC functionality.)

However, it would not be a good idea to embed binary data (files) within component attribute dictionaries as it could become an attack vector for malware. (So, I doubt if Trimble would ever consider this part.)

But such a “bell or whistle” is just likely to be very very low priority. (so much so that it’d never get done.)

I watched the tutorial, this looks like a very promising extension.