Convert Visio shape in an array of x, y-values

Started by visiofox, July 04, 2025, 04:59:28 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

visiofox

Hello again,

is there a convenient way (e. g. external tool) to get an array of
x, y-values of an shape? Something like a path decription, that
means with a certain accuracy (step size)?

I'm aware that I could process the cells of the geometry sections.
And I know the Path.Points-method.

I just want to avoid reinventing the wheel!


Any hints are highly appreciated!
visiofox

wapperdude

#1
What would these points be used for? 
What type of shape?
I'm not aware of any such tool.

Visio 2019 Pro

wapperdude

Cough. Cough.  Cleaned dust off unused gray cells.  😖

There is a code example here:  https://learn.microsoft.com/en-us/office/vba/api/visio.path.points
Visio 2019 Pro

Yacine

You both have good ideas. Let me join the party.
Use the offset method to get a clean path.
Mind that sharp edges will result in separate offset paths. So apply a very small rounding to your shape.
Only then, you can apply the path methode from wapperdude and apply your analysis.
After having got your points, you can delete the newly created shapes. This is done by counting the number of shapes in your drawing and deleting backward till the old state.
Yacine

wapperdude

@Yacine:  Two's company, threes a crowd.  Looks like it might just be us...of course, over here, July 4th holiday may be a factor too.
Visio 2019 Pro

Yacine

Happy independence day. But don't tell Paul.  ;D
Yacine

Paul Herber

Quote from: Yacine on July 05, 2025, 04:30:07 PMBut don't tell Paul.

Don't tell me what? <see nothing> <hear nothing> <taste nothing> <feel nothing> <know nothing>
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Yacine

Now, that's new: the 5 monkeys of wisdom
Yacine

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: 273 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1148KB.
Tokens: post-login.
Cache hits: 14: 0.00334s for 26,587 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]