ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-15-2011
Eike Schulz Eike Schulz is offline
Flexsim User
 
Join Date: May 2011
Posts: 6
Downloads: 3
Uploads: 0
Thanks: 11
Thanked 1 Time in 1 Post
Rep Power: 0
Eike Schulz is on a distinguished road
Default 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  
Old 06-15-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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  
Old 06-15-2011
Brittany Quinn Brittany Quinn is offline
Flexsim User
 
Join Date: May 2011
Posts: 3
Downloads: 10
Uploads: 0
Thanks: 1
Thanked 5 Times in 3 Posts
Rep Power: 0
Brittany Quinn is on a distinguished road
Default

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()]
str path+filename - This is just your path for the sound you want to have played. This also needs to be in quotes. ["C:/My Sounds/APPLAUSE.WAV"]
num volume - This is a number between 0 and 1.
num tempo - This is a number between 0 and 1.
num repeat - If you want it to repeat put a 1. If not, put 0.
num balance - This is a number between 0 and 1.
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  
Old 06-15-2011
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.