What can we improve?




boolean IPS_SetMediaFile (integer $MediaID, string $FileName, boolean $FileMustExist)


MediaID ID of the media object

File name of the media file. The following extensions are possible:

Type of media object appropriate media files
0 (IPSView Form) (since 5.0) ipsView
1 (Image object) bmp, jpg, jpeg, gif, png, ico
2 (Sound object) wav, mp3
3 (Stream URL) url to MJPEG/RTSP stream
4 (Chart)(since 3.1) chart
5 (Dokument)(since 4.3) txt, doc, docx, xls, xlsx, pdf
FileMustExist TRUE, if existence should be checked, otherwise FALSE


If the command succeeds, it returns TRUE, otherwise FALSE.


The command binds the file name FileName to the media object with the ID MedienID. If the parameter FileMustExist is set, IP-Symcon checks if the given file exists. The allocated media file must match the media type of the media object.

The file name needs to be unique. If FileName is already bound to another media object, an error is returned

It is absolutely necessary that these files are stored in the main folder "\IP-Symcon\" or one of its subfolders. Other directories are not possible due to security reasons.


$ImageFile = "C:\\Pictures\\Alarm symbol.png";  // Image file
$MediaID = IPS_CreateMedia(1);                  // create the image in the media pool
IPS_SetMediaFile($MediaID, $ImageFile, true);   // bind the image in the media pool with image file
Deutsche Webseite verfügbar
Go to cart
Any questions?