Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Ryden on August 18, 2010, 02:42:35 PM

Title: Creating a Custom Visio Connector
Post by: Ryden on August 18, 2010, 02:42:35 PM
Hi
I'm trying to make a custom connector with some special features meant for electronic schematics
I want the connector to have three custom properties, Number, Colour and Area.
I want the Number to show up at the ends and the colour to either show up as text above the connector or turn the connector to the appropriate line colour by a selection in the property menu, area is displayed under the connector.

I have tried to fiddle around and since I, ahem.. really have no clue to what I doing, obviously I've gotten nowhere
Where do I start? I tried to create a line ending which was only a text block, but couldn't connect it to my property.
Could some kind soul have mercy on me and give me a point of advice

Regards/Anders Ryden
Title: Re: Creating a Custom Visio Connector
Post by: Yacine on August 18, 2010, 05:39:19 PM
I wish we could have an  answer configurator ... from which, one would chose the answers already posted here.
Unfortunately it is faster to write an answer than to find the right posts.

Ryden,
your question raises so much fundamental visio concepts, that I don't know where to start.

I am too tired this evening to explain this.
So please accept a shape instead of a text ;D

Title: Re: Creating a Custom Visio Connector
Post by: Ryden on August 19, 2010, 10:18:22 AM
Thank you Yacine!
That was great.
I added some things, but I can't seem to get it to work as a single shape, more like a group.
Is it possible go get the name of the line color somewhere, i think it would be a better idea to change line color as usual and let the property contain the name
Also I would like to link the font size of the text boxes to the connectors font size property, I can't find a way to do that.

Big Thank You/Anders
Title: Re: Creating a Custom Visio Connector
Post by: vojo on August 19, 2010, 01:10:08 PM
Maybe something like this would help  (based on some work June did)
Rt click and double click to see behaviors

Title: Re: Creating a Custom Visio Connector
Post by: Yacine on August 19, 2010, 05:08:32 PM
Yes,you need to use a group, but don't group the connector, rather transform it into a group (menu shapes/grouping)
Title: Re: Creating a Custom Visio Connector
Post by: Ryden on August 25, 2010, 12:40:25 PM
I dont have an option to Transform, I can however Convert to group.
That doesn't help though, the textboxes still don't change size together.
Text size should be a property of a shape but I can't get it. How is it done?
Title: Re: Creating a Custom Visio Connector
Post by: Ryden on September 02, 2010, 06:50:38 AM
I think I have gotten it as close as I'm going to get to what I need
Many thanks to you all, esp. Yacine!

It's still a group, I cant' find a way to make it a single shape.
Change line color and the color name above the connector changes, font size from the connector updates the Number textboxes etc

I found this tutorial about DataFields wich would be perfect, but I assume he's talking about Visio 2010 as I can't seem to find the data menu.

I also found a reference to a function called FONTTOID(), is there something similar for colours?

When I look in the shapesheet there is a section called Text Fields which seems to indicate that there can be more than one text field to a shape, how do I add a second text field?

/Anders
Title: Re: Creating a Custom Visio Connector
Post by: aledlund on September 02, 2010, 01:14:39 PM
the data menu started in v2007 and is available in the professional versions (and above)
al
Title: Re: Creating a Custom Visio Connector
Post by: Jumpy on September 02, 2010, 01:31:21 PM
Quote from: Ryden on September 02, 2010, 06:50:38 AM

When I look in the shapesheet there is a section called Text Fields which seems to indicate that there can be more than one text field to a shape, how do I add a second text field?


You can have multiple fields in the one textbox a normal shape has. For Example the Text could contain Creator and CreateDate, both inserted as field.
Title: Re: Creating a Custom Visio Connector
Post by: Visio Guy on September 02, 2010, 04:52:37 PM
You can convert single shapes into groups using Shape > Grouping > Convert to Group.

Any geometry will still be at the group level, and on top of sub-shapes by default. But you can now open the group and put things inside. This is an essential technique for turning Visio's built-in Dynamic connector into something fancy. The geometry has to be at the top level so that Visio can re-write the vertices when it does automatic routing.
Title: Re: Creating a Custom Visio Connector
Post by: Ryden on September 03, 2010, 10:55:09 AM
O, I see! I finally got it!
Instead of grouping the shapes, convert ONLY the connector and add the textboxes
Yes that did it.
Is there a way to anchor the Controls a fixed distance from the ends, as soon as I move a Control it changes it's value to Control.X=Width*0,456 or something similar wich means it moves proportional when the connector end is moved.
Title: Re: Creating a Custom Visio Connector
Post by: Jumpy on September 03, 2010, 12:29:24 PM
I think thats where XDynamics and YDynamics are for.
But didn't changen them myself jet, but the could for example be set to 0mm.
Title: Re: Creating a Custom Visio Connector
Post by: RBKBrown on September 10, 2012, 08:12:12 AM
OK - I'm lost
there *is* no such menu ... "Shape > Grouping > Convert to Group"
where is this on "the ribbon" ?
Title: Re: Creating a Custom Visio Connector
Post by: Paul Herber on September 10, 2012, 09:10:53 AM
Visio 2010 - first you need to ensure developer mode is enabled (ribbon File -> Options -> General
then ribbon Developer -> Shape Design -> Group
Title: Re: Creating a Custom Visio Connector
Post by: RBKBrown on September 13, 2012, 10:41:59 AM
Thank you Paul ... the old menu breadcrumbs nomenclature doesn't reflect the ribbon too well.
NOW: what on earth did VisGuy mean a few posts back by "now you can open up the group and put other things inside"? ... sounds good, but HOW?
Title: Re: Creating a Custom Visio Connector
Post by: Jumpy on September 13, 2012, 12:41:40 PM
On Developer-Tab should be a menu-item "Behaviour".
For the group:
In the dialog you can check a checkbox that the group shall accept other shapes to the group.
For the shapes, that shall be added to a group:
In the dialog you can check a checkbox that the shape shall be added to a group.

I don't have an English version of Visio, so I don't know the english menu names. Hope you find it nevertheless.
Title: Re: Creating a Custom Visio Connector
Post by: drc3838 on September 19, 2012, 02:14:27 AM
hi first time user of visio in a developer stand point
but would like to know if its is possible to create a connector thats spilt (i.e. From Shape A to Shape B and Shape C) From the connectors properties Or Shapesheet.

Cheers
Title: Re: Creating a Custom Visio Connector
Post by: aledlund on September 19, 2012, 03:28:04 AM
As in 'dumb down' the ethernet shape from the network and peripherals stencil.
al