Import / Display image with an extended attribut

11 Posts
4 Users
0 Likes
37 Views
(@m.nau@ypsys.com)
Posts: 0
New Member Guest
 

Hi guys,

I search a way (simplest as possible) to display dynamicaly an image in a generic Pop-up.

My goal is for example to put the directory+name of the image in an extended attributed and load/display it in the generic pop-up. (without vba 😛 ).

Fyi : I can have 500 differents images.

If there's an other solution, I take it!

Manu

 
Posted : 24/03/2015 10:35 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

HI Manu,

I had exactly the same requirement done by one customer few month ago.
The only way I found was to use a third party ActiveX displaying an image and change the path ....by VBA of course!

Surprisingly, not so many ActiveX on the market can do that. There are many "big one" used to manage thumbnails or applying effects on pictures. But a basic one doing only that....
So, I suffered and finally found one and it worked.

I am right now in business trip but I will try finding what I sent to my customer.
Will come back soon.

Nico

 
Posted : 25/03/2015 6:28 am
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Back already (thank you Zendesk!)

The ActiveX is here: http://www.viscomsoft.com/demo/imageviewercpsetup.exe
It's not free but cheap.

I attached the sample project I gave to the customer.
I remember now testing many ActiveX I had a lot of issues about size management. If all pictures have the same size then no problem but if it's different sizes then I had many issues about stretching, ratio, etc...
This one is not perfect but was the best I found. It doesn't stretch but keep the ratio. If you find another which is better please let us know.

Good luck,
Nico

 
Posted : 25/03/2015 6:34 am
LM
 LM
(@l-micaudarcinfo-com)
Posts: 383
Member Admin
 

Is it possible with Microsoft Web Browser ActiveX?

Simply give the image path as a URL.

 
Posted : 25/03/2015 8:03 pm
(@e.ecochard@arcinfo.com)
Posts: 0
New Member Guest
 

Hello,

Here is an idea to try. Create an an animated GIF image with all you images (each image being a frame of the animated gif). Insert the gif image and display the appropriate frame according to a variable value using the variable linking feature. I don't have PcVue here so i am not sure but you should be able to link the variable to the "Starting" and "ending" frame properties.

Of course, the performances will depend on the size of the images.

 
Posted : 25/03/2015 8:24 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Hmmm I am not sure it's really a good idea. You will have a huge gif file. And what will be the behaviour if the picture's dimensions are not the same?

Nico

 
Posted : 27/03/2015 10:09 am
(@admin_doc72)
Posts: 493
Member Admin
 

I agree with Ludo. Web browser ActiveX seems most appropriate.
However, you will need one line of VBA for that.

Why do you exclude VBA-usage?
Is it supposed to be a WebVue project?

 
Posted : 27/03/2015 1:47 pm
(@e.ecochard@arcinfo.com)
Posts: 0
New Member Guest
 

Like I said it depends on the size of the images. As for the case of images of different size, it doesn't really matter since you can build a GIF with all images centered and for the smaller one you can have a transparent "border".

Regarding the Web browser ActiveX, it may be possible to use it without VBA, using the variable linking feature.

 
Posted : 27/03/2015 6:54 pm
(@m.nau@ypsys.com)
Posts: 0
New Member Guest
 

Thank you all for your feed back.

The original goal was to use it also with WebVue.

But in my demo, I will try with Vba and try to find out how I can do this for WebVue.

 
Posted : 27/03/2015 7:11 pm
(@admin_doc72)
Posts: 493
Member Admin
 

Hm, in the case of using WebVue it could be even easier...

Please check the SCADA Basic verb WebVue("CONNECTURL",...).
It allows you to open a new browser window from WebVue. I imagine something like opening a new browser window, resizing it with a little bit of JavaScript magic so that it fits the expected size of your popup-panel, and setting the image URL in JavaScript according to a URL-argument that you pass into the HTML document from SCADA Basic...

Something like:
WebVue("CONNECTURL", "", "http://localhost/PictureRepository/index.html?pic=" + GetArg("BRANCH") + ".jpg&width=120&height=60", "", 0, 1);

 
Posted : 27/03/2015 7:22 pm
(@admin_doc72)
Posts: 493
Member Admin
 

Hello

If there is only few images you can create a symbol for each image and then just used Symbols / Symbols regiser Value to select the one you want to display and I think it is Webvue compliant

Nicolas

 
Posted : 27/03/2015 9:43 pm