Author Topic: Creating a Custom Visio Connector  (Read 19106 times)

0 Members and 1 Guest are viewing this topic.

Ryden

  • Newbie
  • *
  • Posts: 6
Creating a Custom Visio Connector
« on: August 18, 2010, 09:42:35 AM »
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
« Last Edit: September 02, 2010, 11:53:01 AM by Visio Guy »

Yacine

  • Hero Member
  • *****
  • Posts: 2708
Re: Creating a Custom Visio Connector
« Reply #1 on: August 18, 2010, 12: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

« Last Edit: September 02, 2010, 11:54:05 AM by Visio Guy »
Yacine

Ryden

  • Newbie
  • *
  • Posts: 6
Re: Creating a Custom Visio Connector
« Reply #2 on: August 19, 2010, 05: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
« Last Edit: September 02, 2010, 11:53:58 AM by Visio Guy »

vojo

  • Hero Member
  • *****
  • Posts: 1521
Re: Creating a Custom Visio Connector
« Reply #3 on: August 19, 2010, 08:10:08 AM »
Maybe something like this would help  (based on some work June did)
Rt click and double click to see behaviors

« Last Edit: September 02, 2010, 11:53:47 AM by Visio Guy »

Yacine

  • Hero Member
  • *****
  • Posts: 2708
Re: Creating a Custom Visio Connector
« Reply #4 on: August 19, 2010, 12: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)
« Last Edit: September 02, 2010, 11:53:40 AM by Visio Guy »
Yacine

Ryden

  • Newbie
  • *
  • Posts: 6
Re: Creating a Custom Visio Connector
« Reply #5 on: August 25, 2010, 07:40:25 AM »
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?
« Last Edit: September 02, 2010, 11:53:37 AM by Visio Guy »

Ryden

  • Newbie
  • *
  • Posts: 6
Re: Creating a Custom Visio Connector
« Reply #6 on: September 02, 2010, 01: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
« Last Edit: September 02, 2010, 11:53:26 AM by Visio Guy »

aledlund

  • Hero Member
  • *****
  • Posts: 1412
Re: Creating a Custom Visio Connector
« Reply #7 on: September 02, 2010, 08:14:39 AM »
the data menu started in v2007 and is available in the professional versions (and above)
al
« Last Edit: September 02, 2010, 11:53:21 AM by Visio Guy »

Jumpy

  • Hero Member
  • *****
  • Posts: 1061
Re: Creating a Custom Visio Connector
« Reply #8 on: September 02, 2010, 08:31:21 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.
« Last Edit: September 02, 2010, 11:53:12 AM by Visio Guy »

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Creating a Custom Visio Connector
« Reply #9 on: September 02, 2010, 11:52:37 AM »
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.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Ryden

  • Newbie
  • *
  • Posts: 6
Re: Creating a Custom Visio Connector
« Reply #10 on: September 03, 2010, 05: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.

Jumpy

  • Hero Member
  • *****
  • Posts: 1061
Re: Creating a Custom Visio Connector
« Reply #11 on: September 03, 2010, 07:29:24 AM »
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.

RBKBrown

  • Newbie
  • *
  • Posts: 4
Re: Creating a Custom Visio Connector
« Reply #12 on: September 10, 2012, 03:12:12 AM »
OK - I'm lost
there *is* no such menu ... "Shape > Grouping > Convert to Group"
where is this on "the ribbon" ?

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2947
    • Paul Herber's website
Re: Creating a Custom Visio Connector
« Reply #13 on: September 10, 2012, 04:10:53 AM »
Visio 2010 - first you need to ensure developer mode is enabled (ribbon File -> Options -> General
then ribbon Developer -> Shape Design -> Group
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

RBKBrown

  • Newbie
  • *
  • Posts: 4
Re: Creating a Custom Visio Connector
« Reply #14 on: September 13, 2012, 05: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?