How to Display External SVG File in FactoryTalk View ME

Question:

I need to continuously display a local SVG file within my runtime application. The file is located at C:\Users\mccsf\Desktop\file_to_show.svg. I am utilizing an ActiveX Control Object and Microsoft Web Browser Control type to showcase this webpage. However, I am encountering difficulties in setting the URL to "C:\Users\mccsf\Desktop\file_to_show.svg". When trying to adjust the LocationURL property in the Property pane, a warning message without any text appears, preventing me from setting it. In the FactoryTalk SE version, you can edit the VBA Code and add the URL to a Navigation command, but this is not possible in the ME version as I am unable to edit any VBA script. My goal is to display an image from an external network URL within the HMI. Although the panel has network access to the image I want to display, I am struggling to find a suitable method. As the image is an SVG file supported by a web browser, I have turned to using ActiveX Control objects. I also have a BMP version of the file, but it does not meet my requirements. If anyone has successfully displayed an image using a specific external URL, I would appreciate any assistance. Thank you.

Top Replies

It's been about 4-5 years since I set this up, so my memory may be a bit fuzzy. As far as I can recall, I had to use a performance-type terminal for the panelview, not just a standard one. I also had to set up an FTP server on my laptop to store the images, using Filezilla for this purpose. Within Filezilla, I created a user and specified the folder location as a shared folder, granting the user permissions to read and modify files within that folder. Since I was constantly adding new pictures, I had to dynamically change the URL using a string tag in the runtime. The URL format I used was ftp://user@laptopIP:Port/Filename.jpg. I hope this information proves helpful. If I remember anything else, I will be sure to share it here.

To access files through a web browser, users can utilize the File URI scheme. This scheme allows for linking to local files on a computer or network. More information about the File URI scheme can be found on its Wikipedia page.

I want to clarify that I have already successfully populated a folder with live images using FTP through FileZilla. However, I am having trouble accessing these files from the runtime file. I need guidance on how to correctly insert the URL for the images, as I have not been able to find a solution thus far. Can you please provide insight on the specific location and method for adding the URL to access the images?

When inserting the URL into the connection tag, I encountered difficulty accessing a directory on my laptop, which led me to set up an FTP server. By utilizing the Microsoft web browser, I was able to navigate the FTP server and review the file. This approach ensured seamless file retrieval and viewing.

I am astonished by the fact that you had to insert the URL string into the PLC, but I can see the reasoning behind it. This is most likely the solution I was looking for. I appreciate your help and will update you on the outcome.

It sounds like you're already on the right path by using the ActiveX Control object and Microsoft Web Browser Control. However, a guess could be that the issue you're encountering may be due to security restrictions, as local file access can often be blocked by default. Have you tried using file:// protocol before the path, like: "file:///C:/Users/mccsf/Desktop/file_to_show.svg"? Alternatively, as you mentioned that the image is hosted online, have you considered hosting the SVG on a web server and pointing the Web Browser Control to the public URL instead of the local file? This would bypass the issue with local file restrictions and also make maintaining the image easier if updates are needed.

Hi there, it sounds like you're working on something interesting! I don't have direct experience with FactoryTalk ME, but I wonder if your problem is related to file permissions or browser security settings. It might be useful to check if your ActiveX Control and Microsoft Web Browser Control can access local files. If it's a permissions issue, try moving the SVG file to a public directory and see if that works. Alternatively, you could host your SVG on a local web server and use its localhost URL. This way, the problem of treating local files as web URLs might be solved. For the external network URL, may I suggest checking the URL prefix? It should be either http or https for it to work properly. Just some suggestions, best of luck! Let's see if someone else has more experience with your specific setup.

More Replies →

Streamline Your Asset Management
See How Oxmaint Works!!

✅   Work Order Management

✅   Asset Tracking

✅   Preventive Maintenance

✅   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. How can I display an external SVG file in FactoryTalk View ME?

Answer: - To display an external SVG file in FactoryTalk View ME, you can utilize an ActiveX Control Object and Microsoft Web Browser Control type. However, setting the URL to a local file path may encounter difficulties, so consider using a network URL instead.

FAQ: 2. Why am I unable to set the URL for displaying the SVG file in FactoryTalk View ME?

Answer: - If you are encountering a warning message preventing you from setting the URL to a local file path, consider using a network URL instead. Editing VBA code to add the URL to a Navigation command may not be possible in the ME version.

FAQ: 3. Is it possible to display an image from an external network URL in FactoryTalk View ME HMI?

Answer: - Yes, it is possible to display an image from an external network URL within the HMI of FactoryTalk View ME. You can use ActiveX Control objects and Microsoft Web Browser Control type to achieve this.

FAQ: 4. Can I display a BMP version of the image instead of an SVG file in FactoryTalk View ME?

Answer: - While you can display a BMP version of the image in FactoryTalk View ME, if it does not meet your requirements, consider using an SVG file supported by a web browser for better results.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  â†’