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 |
#1
|
|||
|
|||
Access to PC-Speaker from Flexsim
Hi Everybody,
i'm running a model with verly long Scenarios with the Experimenter. At the end of each Scenario the user hast to manually export some data. In addition to a message window I want to notify the user with a beep each time a replication ends. Is there a way to access the PC-Speaker via Flexsim to get that beep? I thought maybe becaus it is based on C++ this would be possible. Thanks in advance Eike Schulz |
The Following User Says Thank You to Eike Schulz For This Useful Post: | ||
Sebastian Schreiber (06-16-2011) |
#2
|
||||
|
||||
look into the commands: soundplay and soundplayfile
With those commands you can play .wav files (your system sound are also wav files I think) I thought there was also something like a beep but can't find it so maybe I mixed it up with C++ |
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Sebastian Schreiber (06-16-2011) |
#3
|
|||
|
|||
I would recommend creating a user event that is set to occurs shortly before a replication ends. In the command, I would use the command:
soundplayfile()This will play a sound directly from a file. But it needs to be attached to a window. To attach it to the window, right click on your 3D View. Select View -> Designate This View (sv). The parameters that go into the command with a brief description are listed below are: obj view - This is your designate view. [sv()]Below is an example of a properly constructed soundplayfile() command. soundplayfile(sv(),"C:/My Sounds/APPLAUSE.WAV",1,1,0,.5);This same information can be found in the User Manual. |
The Following 2 Users Say Thank You to Brittany Quinn For This Useful Post: | ||
Sebastian Schreiber (06-16-2011) |
#4
|
|||
|
|||
Or you can of course use the Beep() command if you toggle your code as C++ and compile your model.
Beep(<freqHz>,<duration_milliseconds>) |
The Following 4 Users Say Thank You to Jason Lightfoot For This Useful Post: | ||
Steven Hamoen (06-15-2011) |
Thread | Thread Starter | Forum | Replies | Last Post |
Modifying Access MDB files… without Access (and free) | Jorge Toucet | Tips and Tricks | 1 | 11-21-2008 05:13 AM |
Sample Access Database | Brandon Peterson | Tips and Tricks | 1 | 07-09-2008 12:15 PM |
Access flexsim-dll-project in Google Code | AlanZhang | Wiki Articles | 0 | 06-27-2008 12:43 PM |
Problem with Flexsim 4.1 and Access DB | Martin Saler | Q&A | 0 | 04-03-2008 05:16 AM |
Can we still access old Flexsim Community Forum? | AlanZhang | Q&A | 5 | 01-02-2008 10:50 AM |