Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: kiler40 on February 01, 2014, 06:25:32 AM

Title: dynamic enclosure of a shape
Post by: kiler40 on February 01, 2014, 06:25:32 AM
Greetings All,
I`m trying to accomplish some tricky (for me) enclosure of a round shape with one "connector" line.
In the attached file i`ve put the connector and the enclosure thing.
I want to accomplish to combine both things. and when i move the control point of the shape, this enclosure to fit to the lenght of the line. but the circle part of it to stay the same size - so it is surrounding the circle part of the connector.

In the same time, they need to resize both with the same scale. the circle part have option "used". when it is "1" the shape gets little bigger and changes color.

Can someone help ?

Thank in advance !

Andrei


Title: Re: dynamic enclosure of a shape
Post by: vojo on February 01, 2014, 06:57:37 PM
After looking at the file....I am not even sure what you are trying to accomplish

Are trying to make the manilla colored thing auto size around the "123" circle?...then the combo can be resized at will?

At first glance, this will take alot of subtle behaviors that you will need to code in the shapesheet or with VBA.
Unless I am missing something, this will be a real tricky / slick piece of work to get what you want done

I think it best to try to explain more fully what you want to accomplish
Title: Re: dynamic enclosure of a shape
Post by: Yacine on February 03, 2014, 05:03:55 AM
Good morning Andrei,
you can use a grouped shape to realise that connector. The trick is to hide the border of the circle at the point where the line crosses it.
I used a small filled rectangle, that is attached to connection points of the background line. These points need to have absolute values, so they don't move when the line is resized.
I leave it up to you to set a parameter in the group shape to modify the width of the border.
The orientation of the smaller circle containing the text can be controlled via the well known formulas to keep a text horizontal.
HTH,
Yacine
Title: Re: dynamic enclosure of a shape
Post by: kiler40 on February 03, 2014, 07:56:35 AM
Good morning Yacine,
thanks for the idea.
I have done everything else so far, and this little rectangle will solve the issue ;)
Title: Re: dynamic enclosure of a shape
Post by: wapperdude on February 04, 2014, 09:06:50 PM
Here's a slightly different approach.  Still a grouped shape, but, avoids the little rectangle.  Just different.

Enjoy.
Wapperdude
Title: Re: dynamic enclosure of a shape
Post by: Yacine on February 05, 2014, 06:07:08 AM
Hallo Wayne,
the difference is rather the 2D instead of 1D shape. Both have advantages.
The rectangle was introduced, because Andrei wanted a border around his shape.  ;D
Title: Re: dynamic enclosure of a shape
Post by: kiler40 on February 05, 2014, 07:18:24 AM
Hello Both.

it is not re-sizing with the main shape, but based on the thickness given.

Here is my idea :)
Title: Re: dynamic enclosure of a shape
Post by: Yacine on February 05, 2014, 06:19:47 PM
Better than mine ;D
Title: Re: dynamic enclosure of a shape
Post by: wapperdude on February 05, 2014, 09:42:59 PM
Fair enough.  Attached does either via right click, context menu.  You can select either fixed or proportional.  Fixed maintains a constant overlap, and proportional changes the overlap proportional to the main shape's size.

Double click allows you to access the shape's data, and set the scale factor used for both options above.

HTH
Wapperdude
Title: Re: dynamic enclosure of a shape
Post by: kiler40 on February 06, 2014, 06:56:05 AM
Nice !
In order of performance, this works better that my one.
More interesting is the behavior in the background of the shape. i`ll have a closer look in it :)

Thanks for the cooperation :)
Title: Re: dynamic enclosure of a shape
Post by: wapperdude on February 06, 2014, 08:27:59 AM
My apologies.  Didn't really mean to take over your post, but, your Visio shape was intriguing.  So, here's one more update.  Now the right click menu allows you to turn the outer shape border line on / off.

Title: Re: dynamic enclosure of a shape
Post by: kiler40 on February 06, 2014, 12:41:30 PM
Hehe :) You are welcome. New Ideas are always welcome :)
Title: Re: dynamic enclosure of a shape
Post by: Yacine on February 06, 2014, 05:40:22 PM
Nice job, W.Dude!  8)