Author Topic: Visio doesn`t update names of shapes  (Read 408 times)

0 Members and 1 Guest are viewing this topic.

Hellboy

  • Jr. Member
  • **
  • Posts: 27
Visio doesn`t update names of shapes
« on: May 06, 2018, 12:19:55 PM »
I made a mistake in the name of the container, after this I changed its name from "Conteiner" to "Container".
In drawing explorer it becomes "Container"
in ShapeSheet header, Shape Layout.Relationships and glue formula it lefts as "Conteiner"
How to update the name of a shape?

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2639
    • Paul Herber's website
Re: Visio doesn`t update names of shapes
« Reply #1 on: May 07, 2018, 02:14:14 PM »
This is the Name/NameU problem. Doing a search in this forum for NameU will find many similar posts.
I have a utility which can help with this problem:
http://www.paulherber.co.uk/visio-utilities/
Electronic and Electrical engineering, business and software stencils and applications for Visio -

http://www.paulherber.co.uk/

Hellboy

  • Jr. Member
  • **
  • Posts: 27
Re: Visio doesn`t update names of shapes
« Reply #2 on: May 07, 2018, 11:30:28 PM »
Thank you, Paul. I`ll see, I really disappointed of such behavior of the "best" diagramming software of the world (:

Hellboy

  • Jr. Member
  • **
  • Posts: 27
Re: Visio doesn`t update names of shapes
« Reply #3 on: May 09, 2018, 01:11:11 PM »
A very good explanation is here :
https://blogs.msdn.microsoft.com/visio/2006/07/27/name-and-nameu/
And very simple macros which rename "universal" name to "local" name
Sub reNameMe()
    Dim visApp As Visio.Application
    Set visApp = Application
    Dim visWin As Visio.Window
    Set visWin = visApp.ActiveWindow
    Dim visSel As Visio.Selection
    Set visSel = visWin.Selection
    ' allow only one shape to be selected
    If visSel.Count = 1 Then
        Dim visShape As Visio.Shape
        Set visShape = visSel(1)
        visShape.NameU = visShape.Name
    End If
End Sub

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2639
    • Paul Herber's website
Re: Visio doesn`t update names of shapes
« Reply #4 on: May 12, 2018, 07:00:34 AM »
There is very good reasoning behind this behaviour. Shapes have a local language name and a universal name. Normally it's only the local name that gets changed.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

http://www.paulherber.co.uk/

Nikolay

  • Hero Member
  • *****
  • Posts: 761
    • UnmanagedVisio
Re: Visio doesn`t update names of shapes
« Reply #5 on: May 12, 2018, 11:28:29 AM »
This universal name is really confusing, like all half-measures.
If you want to identify shapes in multiple languages, you are probably more developer than user.
Then you can just go with shape id or guid instead. Why confuse people with shadow names?

Looks like the intention was to provide power users with tools to develop multilanguage shapes. 
But has anyone ever seen a user doing this? Creating multi-language shapes, that is?

Oh well.. may be this feature is just not hidden good enough.. :)

For masters, it may have sense though. If you want the code like page.Drop( "square" ) to work also in German and Japanese versions of Visio where square is named differently.
« Last Edit: May 12, 2018, 11:39:12 AM by Nikolay »