Dynamic connector names are not consistent

Started by visiousercv, September 02, 2014, 11:32:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visiousercv

Hi,

I am using Visio 2010. When I am using Dynamic Connectors to connect the shapes, its name is coming as "Sheet.x", where x is some number.

It used to be "Dynami connector.x", I don't know what triggered the change.

Any direction on how to change the default name is helpful to me.

Thank you. :)

daihashi

As far as I'm aware you can reference it either way still. To reference as sheet.x you will need to get the shape ID information, where x=ID. You can also refer to it by it's name, which is the dynamic connector.x method.

Regardless of which one you initially use, visio will update it to say "dynamic connector.x" after you've hit enter.

visiousercv

I am reading in the visio diagrams programmatically. I am identifying the shape type based on the name, therefore, it is important to have consistent names.

But sometimes in visio, dynamic connectors have the names as "Dynamic connector.x" and some other times they have it as "Sheet.x".

Paul Herber

Be very careful, things are not that easy, or obvious. Each shape has a Name and a NameU as well as an ID and a NameID. The shape may also have a Master Name and Master NameU, but maybe not. Sometimes what looks like a connector is in fact just a plain line which has a name like Sheet.xxx
Electronic and Electrical engineering, business and software stencils for Visio -

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

visiousercv

I am using the connector tool to connect the shapes. Any idea what is causing this??

On a different note, what is the best attribute to identify the type of a shape.

daihashi

#5
I promise you... the name is always "dynamic connector.x"; but you can also refer to it by sheet.ID

Here is the screenshot. You can check this out for yourself by enabling the developer tab on the ribbon, highlighting the connector you want to view the name of, and then clicking on shape name. See the screenshot below. In this case, the connector name is dynamic connector.8... but can also be referenced in VBA as sheet.8. See the screenshot that I've attached. The behavior you are seeing is normal, nothing is causing it other than the fact that it was designed to work this way. Personally, I always refer to my connectors by their sheet.ID regardless of what the actual name shows up as in the drawing explorer or Name/NameU.

Regarding your other question; I always refer to the shape by it's Shape.ID

Paul Herber

Start Visio, open a new blank diagram, add a connector, open the Connectors stencil, use any one of the many shapes there within, now use the connector tool again. Now click on the pointer tool to turn off adding connectors. Now select one of the connectors on your diagram, click the connector tool and draw a connector, it will draw the latest connector type selected. So the connector tool is no one particular shape. View the shapes in your diagram using the Drawing Explorer.

Electronic and Electrical engineering, business and software stencils for Visio -

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

Jumpy

To identify connectors in VBA:

Shape.OneD shows wether a shape is 1D=connector or 2D-Shape.

To see if it is a dynamic connector there is the ShapeSheet cell ObjectType it has to have the value "2" ?
I'm not sure about the name of the cell or the value for dynamic connector, because I have no Visio at the moment, but you can look it up at MSDN.

zhuravsky

Actually, this problem applicable not only for dynamic connectors. I had a case when Vision eventually changed the name for other shapes also. For example, I had some shapes with the name MCB, and initially when I droped them on page names were like MCB.xxx, after sometime after dropping name bacame Sheet.xxx and after that again MCB.xxx.
I did not find condition why it happend, but this is bug.