Visio Guy

Visio Discussions => Shapes & Templates => Topic started by: Nikolay on January 15, 2017, 08:41:11 PM

Title: Reverse a curve?
Post by: Nikolay on January 15, 2017, 08:41:11 PM
Hi guys,

I've got a simple question - how can I reverse a line (curve) in Visio?
For example, I have a line A => B, but I actually want it to be B => A. How do I do that?
See the picture - the line should go "down", but actually it's going "up". I want to reverse it.

I haven't found anything like "reverse" in shape operations.
Redrawing the line from scratch is not an option - it's pretty complex.

Any help? Thank you in advance!
Title: Re: Reverse a curve?
Post by: Nikolay on January 16, 2017, 01:35:24 AM
Found a way. First use "Trim" operation, then select the fragments in proper order, and use "Join".
Title: Re: Reverse a curve?
Post by: wapperdude on January 16, 2017, 05:26:37 AM
Not sure I understand, and the picture didn't help too much.

So, you've drawn a squiggely line from point A to point B.  You want an identical line, but, it should have gone from point B to point A.  Is that correct?  So, merely flipping it, isn't the solution because the line is now mirrored.  And changing line ends isn't what is desired either.

I didn't understand your stated solution, so I played with it for awhile.  I came up with something that works, uses trim and join operations, but, a few more steps than your solution implies.  See attached.  Fasicinating.  Would never have suspected that this would work.  Very nice discovery Nikolay.

Wapperdude.

Title: Re: Reverse a curve?
Post by: JuneTheSecond on January 16, 2017, 06:04:14 AM
Though I am not sure if I got your mind exactly,
shape.ReverseEnds method replaces the end points of a simple line,
or for NURBS curve Operations/Join (in VBA selection.Join) reverses the direction of a curve.
Title: Re: Reverse a curve?
Post by: wapperdude on January 16, 2017, 06:19:52 AM
Well that's simple.  Thanks June The Second!

I think that's what Nikolay was after, guess we'll find out.

Wapperdude
Title: Re: Reverse a curve?
Post by: Nikolay on January 16, 2017, 09:26:39 AM
Quote
I didn't understand your stated solution, so I played with it for awhile.  I came up with something that works, uses trim and join operations, but, a few more steps than your solution implies.  See attached.  Fasicinating.  Would never have suspected that this would work.  Very nice discovery Nikolay.

Thanks Wapperdude!
Thats exactly the method I also finally used :)

I did not know about shape.ReverseEnds, otherwise it would have saved me a lot of time, thanks Junichi!

I was actually building ski slopes:
https://nbelyh.github.io/svgpublishdemo/stuhlek.html
Title: Re: Reverse a curve?
Post by: Yacine on January 16, 2017, 11:07:52 AM
How cool is that?
Made me google and find this: https://css-tricks.com/svg-line-animation-works/
Title: Re: Reverse a curve?
Post by: Nikolay on January 16, 2017, 01:26:13 PM
Yes! Correct, that's exactly it!

And now you can have those svg/css animations from visio export (you can define directly in diagram, but will require some extra css code). .I plan to post later how to incorporate that easily!
Title: Re: Reverse a curve?
Post by: wapperdude on January 16, 2017, 04:05:46 PM
@Nikolay, @Yacine, @Junichi:  makes me want to un-retire so I have a reason to use these cool features!

Wapperdude
Title: Re: Reverse a curve?
Post by: Yacine on January 16, 2017, 04:35:34 PM
Quote from: wapperdude on January 16, 2017, 04:05:46 PM
@Nikolay, @Yacine, @Junichi:  makes me want to un-retire so I have a reason to use these cool features!

Wapperdude

You wouldn't believe it, but I do understand you.
One needs challenge to develop stuff.
Title: Re: Reverse a curve?
Post by: wapperdude on January 16, 2017, 05:09:43 PM
Uhmmmm...dare I ask what happened to your avatar?  It went AWOL!  I've got extra light bulbs... ;D
Title: Re: Reverse a curve?
Post by: Yacine on January 16, 2017, 05:47:15 PM
hmmm ... not on my screen.
???
Title: Re: Reverse a curve?
Post by: wapperdude on January 16, 2017, 05:49:12 PM
Now it's back...weird.
Title: Re: Reverse a curve?
Post by: wapperdude on January 17, 2017, 01:01:20 AM
@Yacine:  It shows up on my Android based tablet, but not on my Windows PC.  Don't seem to have issues with any other Avatars.  Guess you're special!   ???
Title: Re: Reverse a curve?
Post by: Yacine on January 17, 2017, 08:43:45 AM
Oh, thank you so much :D
Title: Re: Reverse a curve?
Post by: dtallent on February 07, 2017, 02:20:35 PM
I do this a lot with building plot plans, but I select Position, Rotate Shape and Flip Horizontal