Visio Guy

Visio Discussions => Deployment => Topic started by: Thomas Winkel on April 14, 2024, 11:56:42 AM

Title: Online Shapes Library
Post by: Thomas Winkel on April 14, 2024, 11:56:42 AM
Project on GitHub:
https://github.com/Visio-Resources/VisioOnlineShapesLibrary

Public Shapes Server:
https://www.visio-shapes.com/

Current Installer for Visio AddIn:
https://github.com/Visio-Resources/VisioOnlineShapesLibrary/releases/tag/v0.1.4

# News:
29.04.2024: Installer for the Visio AddIn (thanks, Nikolay!)

# TODO:
* 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")?





<<<<<<<<<<<<<<<<<<<<<< Original Post >>>>>>>>>>>>>>>>>>>>>>

Hi,

inspired by discussions in other topics I created a mockup of an online shapes library.
At the moment it is not more than a basic for discussions, but I hope it is a good illustration (see video).
All depends on the implementability of the key feature: Drag & Drop directly from the server to Visio (via AddIn).
Does anyone have an idea how to achieve this?

BR, Thomas

Video:
https://youtu.be/0KASmwGkDRU

Project on GitHub:
https://github.com/Visio-Resources/VisioOnlineShapesLibrary
Title: Re: Online Shapes Library
Post by: Nikolay on April 14, 2024, 03:12:35 PM
Great idea!
I've done the drag-n-drop for "production" addin (while saving shapes in db), but that was long ago (around 20 years ago I guess), and that was in C++...

A "toy" add-in showing how to do it in C# can be found here:
https://github.com/nbelyh/SampleVisioDragDropAddin

The related links with information:
https://stackoverflow.com/questions/37492858/visio-vsto-drag-and-drop/37513185
http://visguy.com/vgforum/index.php?topic=10009

The sample above creates shapes from a stock stencil;
If you actually want to create them from a memory stream (from the downloaded data), that will be a bit more complicated, but perfectly possible.
Title: Re: Online Shapes Library
Post by: wapperdude on April 14, 2024, 04:36:46 PM
My concern, in general, is security.  However, from a company basis, have a central repository of unique, customized repository for shapes, stencils, and templates seems logical.  Being able to drag N drop would efficiently enhance that capability.

For individual user not so much, eh?
Title: Re: Online Shapes Library
Post by: Visio Guy on April 14, 2024, 04:38:04 PM
I have a "jammer" tool that I have long thought might be used for distributing smart techniques via text. This fits in with this discussion, to some extent.

The tool parses "cellname-formula pairs", for example:

// Make shape size according to text content:
Width=GUARD(TEXTWIDTH(TheText))
Height=GUARD(TEXTHEIGHT(TheText,Width))

You basically type or paste this text into the jammer editor, then apply it to all selected shapes.

I allow for some wildcards in the formula portion, like {PARENTID} and {SELECTIONINDEX} for getting the group's sheet reference, or incrementing smarts according to the "index" of each selected shape.

As a public add-in, my idea was to easily allow people to publish smart behaviors and techniques via blocks of text in forum posts or blog articles.

I use it all of the time to make sweeping changes quickly, but it doesn't create geometry very well, as I wanted to be able to append geometries, which requires a bunch of relative index management I haven't had time for.

It has an "extract" feature, so you can, say: get all the User-cells and Shape Data from one shape, then blast them into any number of other shapes. Saves lots of time!
Title: Re: Online Shapes Library
Post by: Nikolay on April 14, 2024, 07:12:41 PM
Quote from: wapperdude on April 14, 2024, 04:36:46 PMMy concern, in general, is security.  However, from a company basis, have a central repository of unique, customized repository for shapes, stencils, and templates seems logical.  Being able to drag N drop would efficiently enhance that capability.

For a company, you can configure a shared folder with stencils/templates, and that's it. The shape search should work, the stencils/templates should show up in the "new".

I would say there is a need for an internet STORE where you can buy/get shapes (or solutions). Similar to other office applications; but this needs to be set up and maintained by Microsoft itself, to be trusted and out-of-the-box thing.

Any third-party store would require an installation of third-party software/plugins, this is a show-stopper for many.
Not to speak about developers: the cheapest digital signature now is $250 / year, with the introduction of the mandatory USB token.

I was thinking about copy-paste of a shape from a web page; with new "web" formats that could be even possible; but Visio still does not support that :(
https://developer.chrome.com/blog/web-custom-formats-for-the-async-clipboard-api. That is, the custom web formats and copy-paste could work without any third-party installs.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 14, 2024, 08:16:06 PM
thanks for all the Feedback :D

Quote from: Nikolay on April 14, 2024, 03:12:35 PMIf you actually want to create them from a memory stream (from the downloaded data), that will be a bit more complicated, but perfectly possible.

Great 8)
Drag & Drop from local stencils is not the problem.
But how to do that from a DB on a remote server?
During my research I came across your article that could provide an approach:
https://unmanagedvisio.com/persisting-visio-shapes/
This way I could store the shapes directly in the database instead storing the stencils in the file-system.
Then I could (not proved that) in the drag event:
* Get the ID of the dragged image
* Get the shape data from the server by ID
* Convert the data to DataObject
* DoDragDrop(data, DragDropEffects.Copy);

My first experiment with your code was only partly successful because the the dropped shape lost formats (color).
Also I tried what happens if properties in document shapesheet are linked.
With regular copy & paste this is no problem. But with this method this information was lost.
I also tried to to serialize the shape object with Newtonsoft JSON, but that`s not possible.

Quote from: wapperdude on April 14, 2024, 04:36:46 PMMy concern, in general, is security. 
The user must trust my AddIn, but if I only allow shapes or stencils without macros that should be secure?
Agree with Nikolay, that MS should integrate such a feature in Visio and also should provide the infrastructure.
Title: Re: Online Shapes Library
Post by: Surrogate on April 14, 2024, 09:08:44 PM
Quote from: Thomas Winkel on April 14, 2024, 08:16:06 PMMS should integrate such a feature in Visio and also should provide the infrastructure.
I'm not sure it's going to be profitable for them!
Title: Re: Online Shapes Library
Post by: Nikolay on April 14, 2024, 10:39:45 PM
@Surrogate IMHO that does not matter. If you support an application, you support it; otherwise you don't.
It's been 10 years already since the App store has been added to the other office applications.

@Thomas - my assumption is that the issue with the color may be related to themes somehow. Maybe you should save not "Shapes" but "Shapes Xml" (or whatever there is) somehow (there are multiple variations of the data stream you can get from a shape). I.e. does the problem with the color happen if you copy/paste on the same diagram? If not, then it's diagram settings probably. Like, in the shape serialized you have a refernece to theme like "THEMECOLOR()" and then ween deserizalized, that resolves to the color of the current theme and not to the one that was serialized.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 15, 2024, 04:00:18 PM
Quote from: Visio Guy on April 14, 2024, 04:38:04 PMI have a "jammer" tool that I have long thought might be used for distributing smart techniques via text. This fits in with this discussion, to some extent.
That definitely sounds interesting to quick and easy modify existing shapes.
Here I would like to create an quick & easy way to search & insert shapes from the community without the need to download and open a stencil before.
Maybe such a community shape server could be hosted here next to the forum.
Every Visguy user would be able to contribute, either by uploading stencils, or by drag & drop from the page into the addin.
The usability is important. If it's not quick & easy nobody will use it.

@Nikolay:
Thanks for your input.
It was a simple rectangle on the same diagram.
I will check that again later this week and create a minimal example.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 17, 2024, 07:25:09 AM
Ok, here is the minimal example for my experiments with Nikolays "Persisting Shapes" approach:
https://github.com/ThomasWinkel/VisioAddinPersistingShapes
There are three buttons and one drop down in the ribbon:
* Get Formats: Fills the drop down with available DataObject Formats of a selected shape
* Save to Clipboard: Exports the chosen DataObject format of the selected shape as text to the clipboard
* Load from Clipboard: Restores the shape from text in the clipboard
No idea what happened before, but now it works like a charm.
Very cool to see how complex shapes can be restored from a few kB of text 8)
One available format is "DeviceIndependentBitmap".
Next step is to transmit both, the shape and the bitmap to the server on Drag&Drop from Visio to the WebView2 control.
Title: Re: Online Shapes Library
Post by: Surrogate on April 17, 2024, 08:51:09 AM
Hi, Thomas!
Quote from: Thomas Winkel on April 15, 2024, 04:00:18 PMMaybe such a community shape server could be hosted here next to the forum.
Every Visguy user would be able to contribute, either by uploading stencils
Not sure that forum's engine (Simple Machines (https://www.simplemachines.org/)) support this opportunity!
Quote from: Thomas Winkel on April 17, 2024, 07:25:09 AMOk, here is the minimal example for my experiments with Nikolays "Persisting Shapes" approach:
https://github.com/ThomasWinkel/VisioAddinPersistingShapes
How we can install it?
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 17, 2024, 09:41:21 AM
Quote from: Surrogate on April 17, 2024, 08:51:09 AMHow we can install it?
Clone (or download) the repository.
Open in Visual Studio.
Hit play button.
See AddIn part in video above, it's the same procedure.

Quote from: Surrogate on April 17, 2024, 08:51:09 AMNot sure that forum's engine (Simple Machines (https://www.simplemachines.org/)) support this opportunity!
No need for direct support from SMF.
I would only link to SMFs user authorization to grant access.
So you could manage your shapes and I can filter for shapes that were contributed by user Surrogate.
Of course that requires custom code.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 17, 2024, 01:02:39 PM
Time for a video update:

* Shape is fetched from the server in JavaScript on 'mousedown' event
* No preview on drag (local drag shows a preview next to the mouse pointer)
* Does not work if I enter the Visio Window too fast (how will this behave on remote servers?)
* For the moment I added the shapeObject strings by hand to the db
  * Did not find a way to do this in watchUploads.py (any ideas?)
* Next step: Add shapes to DB by drag & drop (will replace watchUploads.py)
* Repository updated
Title: Re: Online Shapes Library
Post by: Surrogate on April 18, 2024, 09:17:32 AM
Quote from: Thomas Winkel on April 17, 2024, 09:41:21 AMSo you could manage your shapes and I can filter for shapes that were contributed by user Surrogate.
I can offer this stencil
https://surrogate-tm.gitbook.io/my-stencils/racks/stencil-for-create-rack-diagram (https://surrogate-tm.gitbook.io/my-stencils/racks/stencil-for-create-rack-diagram)
Most of my stencils are not interesting outside of the ex-USSR...
Title: Re: Online Shapes Library
Post by: Surrogate on April 18, 2024, 10:19:12 AM
Quote from: Thomas Winkel on April 17, 2024, 09:41:21 AMSee AddIn part in video above
I try reproduce all step by step like as your video! But I get error after press button Start for compile AddIn.
https://youtu.be/0KASmwGkDRU?t=492
(https://surrogate-tm.github.io/forum/TWerrors.png)
Dont find all these components...
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 18, 2024, 11:26:36 AM
Hmm... Maybe you're missing the used Framework (4.8).   <- The new forum SW is really cool... ( 4 . 8 )
Try to switch to the latest version you have installed:
* In Solution Explorer right click an VisioAddin
* -> Properties
* See screenshot

Your generic rack shape is cool. Should be useful for many people.
Title: Re: Online Shapes Library
Post by: Surrogate on April 18, 2024, 10:01:14 PM
Quote from: Thomas Winkel on April 18, 2024, 11:26:36 AMMaybe you're missing the used Framework
You are right! After adding the new Framework version, error list became 2 lines! These lines related with signing code certificates...
Quote from: Thomas Winkel on April 18, 2024, 11:26:36 AMYour generic rack shape is cool. Should be useful for many people.
Thank you  :)
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 19, 2024, 12:09:00 AM
Code signing... No idea. Can you provide a screenshot?
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 19, 2024, 12:31:19 AM
Update:

TODO:
* Provide an installer
* Shapes can exist without stencil
* Contribute stencils (button in Visio Ribbon)
* User administration
* Delete / Rename / Edit properties
* Public / Private
* Improve search / filter functions
* ... your ideas here

Notes:
Tested to save and restore the complete DataObject.
Hoped that this will enable preview on drag.
Did not work, but at least the bounding-box is more precise.
But it differs from the original, so snap to grid does not work as expected.
Title: Re: Online Shapes Library
Post by: Surrogate on April 19, 2024, 04:33:07 AM
Quote from: Thomas Winkel on April 19, 2024, 12:09:00 AMCan you provide a screenshot?
(https://i.imgur.com/6MnOUAH.png)
pfx key is missing!
Title: Re: Online Shapes Library
Post by: Nikolay on April 19, 2024, 11:15:47 AM
As a best practice, it is better not to put a PFX in the repository.
And to ensure that everything that is in public access actually compiles out of the box ;D
Sharing is Caring, as the M$ guys put it...

From a practical point of view, the fix is easy:
Open project settings, and click "Create Test Certificate" button on the signature tab:
(https://i.imgur.com/hDgxN1y.png)

You will be asked something, just click OK.
Title: Re: Online Shapes Library
Post by: Surrogate on April 19, 2024, 12:15:06 PM
Quote from: Nikolay on April 19, 2024, 11:15:47 AMclick "Create Test Certificate" button
No luck again!
QuoteFailed to get MD5 checksum for the key file "VisioAddin_TemporaryKey.pfx".
My bad, I didn't delete previous pfx key! 
Next problem with Proxy...
(https://i.imgur.com/5IGmEHX.png)
Title: Re: Online Shapes Library
Post by: Nikolay on April 19, 2024, 01:42:54 PM
IMHO, it has nothing to do with the proxy.
You need to run the server obviously (locally on your machine, i.e. 127.0.0.1 aka localhost)
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 19, 2024, 02:17:48 PM
@Surrogate:
Follow the instructions in the video (1st post) to start the server.
You also have to upload at least one stencil (using watchUploads.py) before you can add shapes from Visio.
I will change that in the next commit.
Also I will provide a dockerized server in the cloud for collaborative testing.

@Nikolay:
Many thanks for sharing your Extended Visio AddIn and for your help here!
Your publications are almost the only resources for advanced Visio coding in the internet.
Title: Re: Online Shapes Library
Post by: Surrogate on April 19, 2024, 03:16:29 PM
Quote from: Thomas Winkel on April 19, 2024, 02:17:48 PMFollow the instructions in the video (1st post) to start the server.
I make all these steps, but not sure that I have local server...
Quote from: Thomas Winkel on April 19, 2024, 02:17:48 PMAlso I will provide a dockerized server in the cloud for collaborative testing
Oh my God! 
Title: Re: Online Shapes Library
Post by: Paul Herber on April 19, 2024, 04:55:36 PM
Quote from: Thomas Winkel on April 19, 2024, 02:17:48 PMa dockerized server

I'm so far outside the loop these days that I don't even know what this means.
Title: Re: Online Shapes Library
Post by: Nikolay on April 19, 2024, 07:01:26 PM
I guess to make the whole thing functional, one would need:

- a domain name ($15 annually)
- a hosting that supports python, i.e. that "dockerized server in the cloud" ($60 annually)
- a certificate to sign the add-in ($250 annually)
Title: Re: Online Shapes Library
Post by: wapperdude on April 19, 2024, 07:48:35 PM
There's a loop???  I can't even do hula hoop any more.  🤕
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 19, 2024, 08:44:11 PM
Quote from: Paul Herber on April 19, 2024, 04:55:36 PMI'm so far outside the loop these days that I don't even know what this means.
Not sure if I use the terms correct, but Docker is a virtualization technique that allows to encapsulate server processes. Sounds complicated, but makes things much easier.

Quote from: Nikolay on April 19, 2024, 07:01:26 PM- a domain name ($15 annually)
- a hosting that supports python, i.e. that "dockerized server in the cloud" ($60 annually)
- a certificate to sign the add-in ($250 annually)
Here we go :P:
https://www.visio-shapes.com/
Server: 4€ / Month (4GB ARM64)
SSL certificate: Gratis (Let's Encrypt)
Domain: I don't know (part of my hosting package)

I added the first shape.
Lets see if the server is still running next week, and how many shapes were added... :D

Requires the current AddIn from Github.
For drag & drop the connection is too slow. Sometimes it works, sometimes not.
I think we have to provide an alternative way to paste shapes from the server.

Edit:
Ah, to sign the _add-in_
Damn, that is expensive!
Is there no other option for open source projects?
Title: Re: Online Shapes Library
Post by: Nikolay on April 19, 2024, 09:06:00 PM
I have read that CERTUM provides that, but never tried myself:
https://www.certum.eu/en/code-signing-certificates/
Looks like not for free, but still times cheaper than $250. Looks like they ask for just $25 (if you are developing open source and already have a compatible device to save the certificate - from 2023 physical device is mandatory)

BTW, usually hosting prices like $4 per month are promotional prices; I would watch out for the renewal ;)  (i.e. for the next year)
Title: Re: Online Shapes Library
Post by: Surrogate on April 22, 2024, 03:12:37 PM
Quote from: Nikolay on April 19, 2024, 01:42:54 PMYou need to run the server obviously (locally on your machine, i.e. 127.0.0.1 aka localhost)
Few times I can run this server! Via app.py and so one
(https://i.imgur.com/ucZxEZA.png)
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 24, 2024, 10:24:28 AM
Quote from: Surrogate on April 22, 2024, 03:12:37 PMFew times I can run this server! Via app.py (https://app.py/) 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.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 24, 2024, 10:34:26 AM
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 https://www.visio-shapes.com by default.

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

# TODO:
* 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")?
Title: Re: Online Shapes Library
Post by: Surrogate on April 24, 2024, 12:01:54 PM
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...
(https://i.imgur.com/FfAMXBH.png)
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 24, 2024, 12:34:16 PM
Which Visio version do you use?

Edit:
Ok, I can reproduce that it does not work.
I will check that later.
Until then, build the add-in yourself, please.
Title: Re: Online Shapes Library
Post by: Surrogate on April 24, 2024, 02:52:54 PM
Quote from: Thomas Winkel on April 24, 2024, 12:34:16 PMWhich Visio version do you use?
Visio 2019 Professional (16.0.10409.20028)
Title: Re: Online Shapes Library
Post by: Nikolay on April 24, 2024, 03:02:17 PM
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 :(
      <Component>
        <File Name="Microsoft.Web.WebView2.Core.dll"></File>
      </Component>
      <Component>
        <File Name="Microsoft.Web.WebView2.WinForms.dll"></File>
      </Component>

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...
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 24, 2024, 08:36:00 PM
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.
Title: Re: Online Shapes Library
Post by: Nikolay on April 25, 2024, 01:07:44 AM
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)
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 25, 2024, 11:56:37 AM
Ok, next try:
https://github.com/Visio-Resources/VisioOnlineShapesLibrary/releases/tag/v0.1.3

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 (www.visio-shapes.com) 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:
https://www.youtube.com/playlist?list=PL7yh-TELLS1EyAye_UMnlsTGKxg8uatkM

Once we have user management I can go on with Rename / Edit / Delete / Public / Private.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 25, 2024, 12:10:26 PM
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
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 27, 2024, 09:24:41 AM
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
Title: Re: Online Shapes Library
Post by: Nikolay on April 27, 2024, 02:31:34 PM
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:
https://github.com/octokit/octokit.net

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):
https://visguy.com/vgforum/index.php?topic=5238.0
Title: Re: Online Shapes Library
Post by: Nikolay on April 27, 2024, 04:57:55 PM
There seem to be an issue with the default settings. You have double-escaping there:

(https://i.imgur.com/psqsIVn.png)

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

(https://i.imgur.com/Tkasp0z.png)

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

If that is fixed, install works.
Title: Re: Online Shapes Library
Post by: Yacine on April 27, 2024, 07:13:21 PM
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.
Title: Re: Online Shapes Library
Post by: Nikolay on April 27, 2024, 07:31:08 PM
I'm using community. Works fine for Visio addins.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 27, 2024, 07:32:27 PM
Many thanks for investing your time, Nikolay!
It would definitely have taken me a long time to find this error.

@Yacine
I use the community edition and this is absolutely sufficient for everything that I do.
At work I have the professional version for writing EPLAN AddIns and honestly I don't see any differences.
Title: Re: Online Shapes Library
Post by: Paul Herber on April 27, 2024, 08:05:40 PM
I originally used the community version for writing my Utilities. Did all that was needed for me.
Title: Re: Online Shapes Library
Post by: Surrogate on April 27, 2024, 08:48:44 PM
Quote from: Yacine on April 27, 2024, 07:13:21 PMDid you guys get the pro version, or are you working with the free community one?
I use Community edition.
Quote from: Thomas Winkel on April 25, 2024, 11:56:37 AMOk, next try
I didn't try it yet  >:(
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 29, 2024, 05:29:44 PM
Finally working :D
https://github.com/Visio-Resources/VisioOnlineShapesLibrary/releases/tag/v0.1.4

No new Features, but a confirmation that the installer works.
And the first beautiful shape from the community has been committed... ( thanks, Rolf!  :-*  )

From now on I will always link the current version in the opening post.
As well as some News, TODOs, Comments.
Title: Re: Online Shapes Library
Post by: Surrogate on April 30, 2024, 05:18:39 AM
Quote from: Surrogate on April 27, 2024, 08:48:44 PMI didn't try it yet
For versions 0.1.0 and 0.1.3 I didnt have button 'Online Shapes' at ribbon
Quote from: Thomas Winkel on April 29, 2024, 05:29:44 PMFinally working :D
https://github.com/Visio-Resources/VisioOnlineShapesLibrary/releases/tag/v0.1.4 (https://github.com/Visio-Resources/VisioOnlineShapesLibrary/releases/tag/v0.1.4)
Thank you, Thomas!
I try tested latest VisioOnlineShapesLibrary_0.1.6.msi (https://github.com/Visio-Resources/VisioOnlineShapesLibrary/releases/download/v0.1.4/VisioOnlineShapesLibrary_0.1.6.msi) version. I can see  button 'Online Shapes' at ribbon.
(https://i.imgur.com/i4Y6mB5.png)
I upload two shapes. But cant upload whole stencil  :o
(https://i.imgur.com/VMlghTK.png)
In pane I cant see online shapes from your site (www.visio-shapes.com)
 
Title: Re: Online Shapes Library
Post by: Thomas Winkel on April 30, 2024, 06:37:30 AM
Thanks for testing, it works :D

Contributing stencils from Visio is not yet implemented.
First I work on user management because this affects the data model.
This may take a while because I have little time right now.

Now you can only drag shapes to your drawing and the download counter will increment.
A click on a shape will open a bigger preview in your default browser.
Title: Re: Online Shapes Library
Post by: Thomas Winkel on May 03, 2024, 10:32:43 AM
Quote from: Nikolay on April 27, 2024, 02:31:34 PMBTW, 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)

Interesting.
Contributors would need a local repository to commit stencils or documents.
User could download from GitHub Pages or could also sync a local repository to have everything available (even offline).
Right?
I think this is a robust solution.
In our company we do similar (but without website) using SVN.
The reason for SVN was because it is able to lock files, allowing only one write access at a time.
This is the only way to protect binary files from conflicts caused by parallel modifications.

Quote from: Nikolay on April 14, 2024, 07:12:41 PMFor a company, you can configure a shared folder with stencils/templates, and that's it. The shape search should work, the stencils/templates should show up in the "new".
This shape search does not work four our company solution.
We configure the stencil path (to the local SVN checkout) in File -> Options -> Advanced -> File Locations
I never checked that before, but this search also does not work with stencils that are installed with your Extended Visio Addin Project.
(Not even if the stencil is open.)