Author Topic: Remove decimal number from shape names  (Read 11245 times)

0 Members and 1 Guest are viewing this topic.

tbaron27

  • Jr. Member
  • **
  • Posts: 13
Remove decimal number from shape names
« on: August 30, 2019, 05:35:19 PM »
How does one remove the .xx number from the end of a Visio shape name. I am using both the inventory report function and the visio legend shape. Most of my shapes show up just as i have name them, however some have a .xx at the end.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4599
  • Ideas Visio-lized into solutions
Re: Remove decimal number from shape names
« Reply #1 on: August 31, 2019, 12:01:31 AM »
The added decimal number suffix indicates that you edited the Master shape and then dropped it.  Visio differentiates this new master from the previous by adding a decimal suffix.  Had you saved the edited master with a new name, then, there would not be a decimal suffix.

The Inventory report is hard coded, and I'm not aware of a method to drop the numerical suffix.  An option would be to write a custom macro which could eliminate the suffix.
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4599
  • Ideas Visio-lized into solutions
Re: Remove decimal number from shape names
« Reply #2 on: August 31, 2019, 09:23:52 AM »
For custom code examples see my reply to this post, it contains two links that should be helpful.
http://visguy.com/vgforum/index.php?topic=7305.msg30752#msg30752
Visio 2019 Pro

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3343
    • Paul Herber's website
Re: Remove decimal number from shape names
« Reply #3 on: August 31, 2019, 10:12:30 AM »
Have you edited the file with more than one version of Visio?
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

tbaron27

  • Jr. Member
  • **
  • Posts: 13
Re: Remove decimal number from shape names
« Reply #4 on: January 08, 2020, 05:30:35 PM »
I having the same issue again. The legend populate the shape name with .### after my shape name. I have deleted and re-added to the stencil. I have searched every property I can think of. See screen shot attached. As you can see it does not happen with all of my shapes.

vojo

  • Hero Member
  • *****
  • Posts: 1697
Re: Remove decimal number from shape names
« Reply #5 on: January 08, 2020, 09:27:32 PM »
I think visio really really needs the decimal suffix.
It plays into the internal database for cell updates at the least and probably makes distinguishing 2 instances of same shape hard

Could look at the world wide unique name of the shape but its not all that user friendly
Could look at creating a name in a user cell that does what you want.
could look at using the shape.xxx name, export it, then use some script to peel off xxx...again, it will bard to tell 2 shapes apart.

tbaron27

  • Jr. Member
  • **
  • Posts: 13
Re: Remove decimal number from shape names
« Reply #6 on: January 08, 2020, 09:33:12 PM »
What I don't understand is that it does it for some shapes but not for others. I've even had it were a shape will show in the legend without the numbers. Then I've edited the Master Shape to make it bigger, or change color, or something simple, and then when I add the newly modified shape back to my page, the legend will add the numbers. There doesn't seem to be any rhyme or reason.

Surrogate

  • Hero Member
  • *****
  • Posts: 1730
    • ShapeSheet™ Knowledge Base
Re: Remove decimal number from shape names
« Reply #7 on: January 09, 2020, 12:19:26 AM »
Then I've edited the Master Shape to make it bigger, or change color, or something simple, and then when I add the newly modified shape back to my page, the legend will add the numbers. There doesn't seem to be any rhyme or reason.
you change master shape into document stencil (local) or external stencil (vss-document)?

tbaron27

  • Jr. Member
  • **
  • Posts: 13
Re: Remove decimal number from shape names
« Reply #8 on: January 09, 2020, 12:34:25 AM »
I believe the .vss file. I right click stencil and choose edit stencil. I then right click shape and choose edit master shape. Then save the stencil.

Surrogate

  • Hero Member
  • *****
  • Posts: 1730
    • ShapeSheet™ Knowledge Base
Re: Remove decimal number from shape names
« Reply #9 on: January 09, 2020, 03:47:45 AM »
Right!
You have exist shapes based on old edition of master-shape?
If yes, when you drop new edition all new instances will based on new edition of master shape. All these instances have parent master shape with decimal number in name. As mentioned Mr. Wapperdude in message
http://visguy.com/vgforum/index.php?topic=8889.msg39022#msg39022

If you need prevent this behavior, just delete old master shape from document stencil.
« Last Edit: January 09, 2020, 03:51:51 AM by Surrogate »

vojo

  • Hero Member
  • *****
  • Posts: 1697
Re: Remove decimal number from shape names
« Reply #10 on: January 09, 2020, 07:50:08 AM »
remember....when you drop a shape on a sheet, it is also copied to the document stencil.
So after that, you can change the master shape in a shape stencil and it has no effect on the drawing shape.
New drops pick up new shape and copies that shape as well to document stencil

tbaron27

  • Jr. Member
  • **
  • Posts: 13
Re: Remove decimal number from shape names
« Reply #11 on: January 09, 2020, 10:27:24 AM »
That did it. Thank you everyone, especially Vojo, for clarifying the shape stencil vs. the document stencil. I opened the document stencil and deleted every shape that was in it. Now when I drop shapes from my master shape stencil, the legend no longer adds the numbers and I just see the master shape name  :D :D :D :D. I knew it had to be a fairly simple fix, I just didn't know about the document stencil. Thanks again!!!

vojo

  • Hero Member
  • *****
  • Posts: 1697
Re: Remove decimal number from shape names
« Reply #12 on: January 09, 2020, 10:35:14 AM »
np..glad to help

But I think you should play around more:  After deleting shapes in document stencil, not sure why the suffix is not present.

Maybe try dropping a few shapes and play around to make sure the situation is as you want.
- 2 copies...then change something on one of the shapes (wider or taller) to see what doc stencil does
- etc.

Basically, I am surprised the suffix is removed for going forward just because the doc stencil is cleared.
(All I was trying to point RE doc stencil was that doc stencil piece helps break the actual stencil <=> drawing linkage)