How can we configure thumbnails for PI Coresight 2016 custom symbols ?
Actually, in the coresight home page, custom symbols are always shown as blue boxes.
As of right now there is no way to add a thumbnail for a custom symbol. They are always shown as the blue box.
As a developer, how would you envision yourself doing this? We have thought of a couple of ways, but would love to get your ideas.
We already create 3 files for a symbol, we could add a fourth. Then PI CS takes care of loading the thumbnail, or defaulting to the placeholder thumbnail if no thumbnail is present.
- sym-name-favicon.png (or similar)
Thanks, Rhys. That's one of the ways we were considering and probably the easiest thing to do. Some issues could arise with the size and scaling of the favicon image in the thumbnail, but I do think that would be negligible.
I think the simplest way should be using a property as done fore the 'iconUrl".
How is it manged now in the default symbols?
The best should be to dinamically create it like thumbnail for Processbook display, but i don't know if it is tecnically possible : pbook are svg graphics while CS Custom symbols are css/html stuff.
iconUrl is basically what we considered and what Rhys was suggesting above and I agree with you, this would probably be the simplest for the PI Coresight development team.
Regarding default symbol thumbnail creation, we do that all in C# code on the server. There is a one to one mapping of the default symbol types to C# drawing code that actually creates the dynamic version of that symbol on save and adds it to the thumbnail. Leveraging this method for extensible symbols would require the extensible symbol developer to write C# code and for the PI Coresight team to create a server side add in model for that C# code. This is probably the most difficult solution for everyone.
Another option, as you mentioned, would be to figure out a way to render the HTML/CSS/JS of the extensible symbol on the PI Coresight server and inject that graphic into the thumbnail. This is not as hard as the add in model I suggested above, but still difficult.
I wanted to ask a side question here, how important is it that the thumbnail exactly matches the display?
FYI, I have added your suggestion to UserVoice as well, Show custom symbols on display thumbnail.
I think that in a first step is not so important that the thumbnail exactly matches the display but it is important to recognize different custom symbols. The displays home page is very usable for searching PB Display because you can recognize easily "the" processbook you want. But, if you are so smart to create a set of beautiful custom symbols , it 's very frustrating to see a page planty of blu boxes! and you are forced to "read" that old plain procesbook names....
Thanks, Davide. I wouldn't want to force anyone to read! LOL
Retrieving data ...