Link to home
Start Free TrialLog in
Avatar of Aaron Petrie
Aaron Petrie

asked on

Visio Dynamic Connector with auto numbering

Hello,

I have downloaded a dynamic connector created by John Goldsmith
http://visualsignals.typepad.co.uk/vislog/2015/04/building-a-labelled-dynamic-connector-in-visio.html

I have edited it and am currently using it as a cable label in schematic diagrams. I find this shape very handy because it syncs the start and end connectors.

Is there a way to add in an auto numbering feature to this shape?

I would like to use a format of X001 , where X is a letter indicating the type of cable (e.g. V for video, A for audio etc).
I would then like the shape to number up by 1 when copied.

Would this be best to do as a formula in the Shape Sheet? Or by using code?

Thank you for your help, I appreciate it.
Avatar of Aaron Petrie
Aaron Petrie

ASKER

I have attached a drawing containing the connectors.
Dynamic-Connectorvsdx.vsdx
Avatar of Scott Helmers
I would start with the Number Shapes Add-On in Visio to see whether it will do what you want:
Select View>Macros>Add-Ons>Visio Extras>Number Shapes.

A couple of caveats:
1) The default settings don't number shapes as you drop them onto the page.
2) The default settings exclude connectors.
3) The default settings may add numbers to shapes you don't want numbered.

You can resolve #1 by checking the highlighted box shown at the bottom of this image. The highlighted radio button at the top of the dialog lets you click on existing shapes to number them; the second setting is part of the answer to restricting which shapes are numbered (the rest of the answer is below).User generated imageYou can resolve #2 and #3 by using the settings show in the image below. The Selected layers setting takes advantage of the fact that all dynamic connectors in Visio are automatically added to a layer called "Connector".User generated image

One other thing to note about the Number Shapes add-on: you can include a text prefix. After adding a number to a shape, take a look at the shape data fields that are added to each shape. Type any value into the field named Shape Number Text and that text will precede the number. Granted, you will need to do this manually for each shape, but you could write code to automate this action if you want to.

I don't know whether this built-in add-on will be sufficient for your needs, but let me know what you think after you experiment a bit.
Aaron -- I'm glad to see that you did what I almost suggested yesterday, which is posting this question on John Goldsmith's blog. He's a great guy and I happen to know from private communications that he's looking into the issue...
Hello Scott,

Thank you very much for explaining the auto-numbering add on. I appreciate your assistance.

John Goldsmith has replied to my question on his blog. I will use the information that you have provided and Johns comments to create an auto-numbering dynamic connector.

Again, thank you for your assistance, I appreciate it.
I'm glad we were able to help.

One correction to my initial response above (you may have already figured this out, but for completeness, here's the correction):
In the first dialog box above I suggested you choose "Select shapes" rather than "All shapes". That's incorrect. You'll want to choose "All shapes". The "Selected shapes" option only appears if there are one or more shapes selected at the time you invoke the Number shapes add-in and will be grayed out otherwise. The option that really does what you want -- limiting numbering to Connectors -- takes place in the second dialog box by using layers.

Feel free to leave this question open a bit longer if you think you'll need additional assistance or if you'd like to post your eventual solution (which is always a bonus for someone who comes along after you looking for something like this). Otherwise, feel free to close the question.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.