Online Shapes Library

Started by Thomas Winkel, April 14, 2024, 11:56:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Quote from: Nikolay on April 19, 2024, 01:42:54 PMYou need to run the server obviously (locally on your machine, i.e. aka localhost)
Few times I can run this server! Via and so one

Thomas Winkel

Quote from: Surrogate on April 22, 2024, 03:12:37 PMFew times I can run this server! Via and so one
Good news, thanks for testing :)

Quote from: Nikolay on April 19, 2024, 09:06:00 PMI would watch out for the renewal
It`s the cheapest Hetzner cloud server without time contract. The actual price is 4,51€ / month.
This is great for testing because I only pay for running servers.
Yesterday a friend told me that IONOS offers similar even cheaper (1€ / month). But only 1GB RAM.

Quote from: Nikolay on April 19, 2024, 09:06:00 PMLooks like not for free, but still times cheaper than $250.
I think I'll have to make the 250€/year invest in the near future anyhow, for other projects.  >:(
I've never dealt with code signing before. It should be possible to sign with the eID of my national identity card.
For the moment I'll publish without signing.

Thomas Winkel

New release available.

Now with installer for the AddIn:
#### Sorry, not working. I will check that later...

No need to setup a local server anymore because it uses by default.

# Updates:
* JS independent from actual URL
* Moved buttons to panel
* Settings to configure specific servers
* Drop down to switch between servers
* Added installer

* Add stencils from Visio
* User management
* Rename / Edit / Delete
* Public / Private / Groups?
* Improve search / filter functions
* ... your ideas here

# Notes:
* Possible to pre-fetch DataObjects of visible shapes in JS?
* Store complete DataObject as serialized (and compressed?) Dict<string format, string data> (not only "Visio 15.0 Shapes")?


Quote from: Thomas Winkel on April 24, 2024, 10:34:26 AMNow with installer for the AddIn:
I try install latest version, but have no luck...

Thomas Winkel

Which Visio version do you use?

Ok, I can reproduce that it does not work.
I will check that later.
Until then, build the add-in yourself, please.


Quote from: Thomas Winkel on April 24, 2024, 12:34:16 PMWhich Visio version do you use?
Visio 2019 Professional (16.0.10409.20028)


The error is most probably you need to include the dependency DLLs (Microsoft.Web.WebView2) explicitly to the setup (Product.wxs), it is not automatic :(
        <File Name="Microsoft.Web.WebView2.Core.dll"></File>
        <File Name="Microsoft.Web.WebView2.WinForms.dll"></File>

Without certificate, the issue is, most probably the BROWSER will block download of the EXE/MSI (smart screen), so users won't be able to even download it :(
Signing with identity card is a dream, I doubt it will ever happen - these stupid certificates is a big business...

Thomas Winkel

Yes, this was one problem, Webview2 and Newtonsoft.Json.
But also "VisioAddin.dll.config" is required and I do not understand why.
This is a xml document that contains default values for the settings (defined in project properties).
I could simply add it to Product.wxs and it should work.
But in a similar project this is not required and I would like to understand what happened here before I do that.
Do you have an idea?

So far I only have a few users, all of whom I know personally.
So I can show them how to bypass the security mechanisms to install my SW...
But of course that is not an option for a reputable company.
250€ a year only to verify a copy of my ID card (or however that works) is a bold business model.


It requires that ".dll.config" if you use the Newtonsoft JSON (it overrides some old versions there).
At least that's my assumption.

Regarding certificates - yes, it's a really cool business model. They validate your pass basically, yes.
BTW Microsoft itself does not hesitate to charge for that $540 a year (via DigiCert)

Thomas Winkel

Ok, next try:

Please test:
* Installation
* Drag the Shape from the default server
* Contribute some shapes to this server
You can also try to set-up your own server.
The AddIn now has the option to switch between servers.

The default server ( is only for testing.
So do not hesitate to contribute as much nonsense as you like ;D
I'm interested how it behaves if many people access it at the same time.

Next step is "user management".
But first I need to learn more about Flask:

Once we have user management I can go on with Rename / Edit / Delete / Public / Private.

Thomas Winkel

Quote from: Nikolay on April 25, 2024, 01:07:44 AMIt requires that ".dll.config" if you use the Newtonsoft JSON (it overrides some old versions there).
At least that's my assumption.
I have another much bigger Visio AddIn project that also uses Newtonsoft.Json and project settings (but not WebView2).
And there I do not publish the dll.config.
I spent an hour trying to find the difference with no result... :-\
Maybe the difference is that the other AddIn does not access the project settings on load.

Quote from: Nikolay on April 25, 2024, 01:07:44 AMBTW Microsoft itself does not hesitate to charge for that $540 a year (via DigiCert)
And we are stupid enough to publish solutions for MS products for free... ;D

Thomas Winkel

It looks like the installer only works on my machine.
I tested this with a friend who had another project of mine working.
It installs, but it does not load:
"Load Behavior: Not loaded. A runtime error occurred during the loading of the COM Add-in."
Tried to downgrade .NET Framework to 4.7.2 without result.
@Nikolay: Do you have another idea?

I continue with the user management feature until I come back to the installer... :P


I have not tried to install your add-in. Will do.

BTW, I was thinking about similar online storage, but on the base of GitHub (i.e. no backend/no python app at all).
The authentication is done via GitHub login.
People can contribute stencils/shapes by creating a pull requests to the repository.
The repository is exposed via GitHub itself (i.e. using GitHub pages).
Also no payment for hosting required then, imho this is the only way to make site live long (years)

If you are interested, there is Octokit library to work with GitHub:

It would be even better if Microsoft guys finally provide AppStore for Visio of course.

Here are some thoughts (from 10 years ago, but anyway):


There seem to be an issue with the default settings. You have double-escaping there:

So the first time the add-in runs on a new machine, it trows an exception here:

Try resetting your saved settings and running the add-in directly from Visual Studio, the same error appears.

If that is fixed, install works.


I see you guys working in Visual Studio. Nikolay obviously since he does that on a professional basis, but now also Thomas and Surrogate.
Did you guys get the pro version, or are you working with the free community one?
And does the community edition suffice for writing Visio addins?

Sorry for stumbling in off topic.