Main Menu

Recent posts

#21
General Visio / Re: How to only change the gro...
Last post by Thomas Winkel - May 03, 2024, 10:12:48 AM
I don't know if this can be done easy for "finished" group shapes.
But you could protect the sub-shapes using GUARD().
#22
Programming & Code / Re: Python ... again
Last post by Thomas Winkel - May 03, 2024, 10:04:19 AM
Hi Yacine,

interesting topic.
My first contact to Python is the Online Shape Library because I decided to use Flask on server side.
There I also use win32com.client to fill the database because I thought it could be easier to access Visio from Python than accessing the database from VBA (and because I wanted to try it out).
For this project I use VSCode.

I think JupyterLab is a great MATLAB replacement for data analysis, control engineering and scientific calculations.
Thus, everywhere plots or descriptive flows are required for presentation.
But at the moment I do not see a benefit for Visio automation here...?

For me the main barrier using Visio with Python is the lack of IntelliSence as it comes with the VBA Editor or Visual Studio:
Auto-complete, function/parameter description, etc..
In VBA you can even edit the code or change the current execution line while debugging!
For me that makes VBA the best prototyping platform (if Visio is the focus).

On the other hand VBA comes to limits as the project grows or for "professional" projects.
It's not good for collaborative work on the same (binary) files.
Also there are no reasonable solutions for things like DataGridView, TreeView, Newtonsoft-JSON, etc. available.

So, in my opinion:
* If it's satisfying go with VBA
* If VBA is not satisfying go with a .NET AddIn
* Everything else to integrate Visio in another environment (depending on your project and skills)

Anyway, I really like Python and am currently spending some time learning how to use it for server-side applications.
#23
General Visio / How to only change the group s...
Last post by Visisthebest - May 03, 2024, 09:21:35 AM
If I select a group shape with subshapes and change for instance the text settings from centered to left, the text in the subshapes also moves to the left.

How can I only change the group shape in the Visio UI without changing the subshapes?
#24
Visio Bugs (er...Issues) / Re: Visio 365 - Cannot link to...
Last post by wapperdude - May 02, 2024, 07:20:16 PM
If the problem persists, please upload file that has the issue.
#25
Programming & Code / Re: Python ... again
Last post by wapperdude - May 01, 2024, 11:25:24 PM
Take your location with you.  👀😲🙄😆
#26
Programming & Code / Re: Python ... again
Last post by Paul Herber - May 01, 2024, 08:38:02 PM
Quote from: Yacine on May 01, 2024, 07:06:55 PMP.P.S.: Welcome back, moving completed?

Haven't been away, just hovering. Not moved yet, maybe a couple of weeks.
P.S. When we move my Location will change.
#27
Programming & Code / Re: Python ... again
Last post by Yacine - May 01, 2024, 07:06:55 PM
So I would probably need to edit my old posts?

P.S.: Yes, I tried it and it actually works better than the previous one. Now you can place the images where you want them to be.

P.P.S.: Welcome back, moving completed?
#28
Programming & Code / Re: Python ... again
Last post by Paul Herber - May 01, 2024, 06:57:44 PM
Quote from: Yacine on May 01, 2024, 06:55:35 PMthe forum doesn't show uploaded images anymore.

Click the Reply button and you can drag-and-drop images.
#29
Programming & Code / Re: Python ... again
Last post by Yacine - May 01, 2024, 06:55:35 PM
I've written several posts on the subject.
https://visguy.com/vgforum/index.php?topic=9883.0
https://visguy.com/vgforum/index.php?topic=10259.0
https://visguy.com/vgforum/index.php?topic=9774.0
https://visguy.com/vgforum/index.php?topic=9810.0 - specially this one lacks from the fact that the forum doesn't show uploaded images anymore.
https://visguy.com/vgforum/index.php?topic=9216.0
https://visguy.com/vgforum/index.php?topic=8584.0
http://visguy.com/vgforum/index.php?topic=9884.0

In short:
- win32com gives you access to visio's object model, as VBA and C# do.
- Python is way faster in prototyping code than its competitors
- Jupyter Lab with its capability to run small chunks of code makes it an ideal REPL tool for Visio.

I use it mainly for manipulating data of P&IDs and PFDs, but also for fun stuff, like the Piet post, or this one
https://visguy.com/vgforum/index.php?topic=9859.0
where I generate randomly flowers.
#30
Programming & Code / Re: Python ... again
Last post by Robert K S - May 01, 2024, 03:02:52 PM
Can you explain how Python/Jupyter could be used to manipulate Visio drawings?