News:

Happy New Year!

Main Menu

Visio-Tools

Started by Thomas Winkel, January 23, 2025, 12:19:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thomas Winkel

12.02.2025: New version attached

I announce the "Visio-Tools" stencil.
You cannot view this attachment.

It brings some features that I often use in my projects:
* Open Document folder
* Fit all pages to window
* Select tools
* Arrange selected shapes like the first two
* Count selected shapes
* Sketch tool :)
* Export DataRecordsets (external data) to Excel

But I see it as base for your own VBA projects:
* MIT License
* Adapt Ribbon to your needs: Export XML -> Edit -> Import in "Developer" module
* Learn from the code design and extend it to your needs
* "Ui" module as communication layer for the following tasks:
  - Undo Code
  - Performance tricks (Application.ShowChanges)
  - Messages boxes
  - Input boxes
* Demo: Progress form for time intensive tasks
* Demo: Store settings (checkbox state) in ActiveDocument
  - Updates Ribbon if user switches between documents with different states
* Demo: Store settings (checkbox state) in Windows Registry
  - Button to clean the Registry (remove this setting)
* OpenExtern.OpenFileOrUrl() opens everything that has an associated application (xlsx, txt, Urls, ...)
* "Lookup" modules has ENUMs for Excel (for using late-binding)

In the future I will integrate more demo code and features.

Previous topic is here:
https://visguy.com/vgforum/index.php?topic=7134

Yacine

#1
This is more than an exercise, it is actually really useful.
Very nice job.

Bienchen!  ;)
  GeradeausEngineering

The arrange tool is nice. A time saver when arranging similar stuff.
Yacine

Thomas Winkel

Quote from: Yacine on January 23, 2025, 04:26:21 PMThe arrange tool is nice.
Thanks :) We mainly use this after adding many shapes via drag & drop from the "External Data" window.

Thomas Winkel

New Version:
* Tool: Export -> Edit -> Import ShapeSheet
* Demo: Ask ChatGPT / Ask Claude
* Export: Shape Properties
  * Select in Excel -> Auto-select in Visio
  * Change in Excel -> Auto-change in Visio
  * See Ribbon Visio-Tools in Excel export
  * XLSM is stored as base64 encoded string in a document user cell :o
    -> All code to import / export binary files is included (-> Developer.ImportFile())
* Export: images of selected shapes to Excel (as picture in cell and as comment)
  * Autofilter is functional
* Clean-up Ribbon
* Links to the corresponding VisGuy topics as code comments

Nikolay

Hmmm where is "Ask DeepSeek"?  ;D

Thomas Winkel

Good question. DeepSeek could even be integrated locally, powered by VBA :o
Maybe DeepSeek can do this itself like Claude did based on my OpenAi code.

According to the documentation the DeepSeek API is compatible to OpenAi.
So I would expect it to work if you just replace the API endpoint.

Yacine

Did you want to share a file and code or only the ideas?
Yacine

Thomas Winkel

File with code is in the first post: VisioTools_m.vssm

Yacine

Ah, it was not obvious that you updated it.
Yacine

Thomas Winkel

Update:
* Demo: File open dialog
* Demo: Copy & Past Clipboard
* Demo: GUID
* Demo: Sync data
  -> drop SyncDemo shapes, change Name, click Refresh, change Data
  -> Problem: Does not work before Name is changed. Any ideas?
* VisioForms: CheckBox, RadioButton
  -> Double click, or right click shape
* Fix: Open Excel export als read-only to allow overwriting

Find download in opening post.

Thomas Winkel

Update:
* Fix: Select horizontal / vertical

Find download in opening post.

Thomas Winkel

Update:
* Hide Pages
* Hide Masters
* AskOllama (for local AI, no Ribbon button)
* README module for Visio object model and VBA best practices

Find download in opening post.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 339 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1192KB.
Tokens: post-login.
Cache hits: 13: 0.00126s for 26,601 bytes (show)
Cache misses: 2: (show)
Queries used: 17.

[Show Queries]