Author Topic: Copying a Visio page with shapes, do the shapes retain their ID's?  (Read 3501 times)

0 Members and 1 Guest are viewing this topic.

Visisthebest

  • Sr. Member
  • ****
  • Posts: 434
When you copy a Visio page (with the duplicate function when you right-click a page), do Visio shapes always keep the same ID's as on the original page?

The Unique ID's get erased which makes sense, as these should be globally unique.
Visio 2021 Professional

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4046
  • Ideas Visio-lized into solutions
Re: Copying a Visio page with shapes, do the shapes retain their ID's?
« Reply #1 on: July 15, 2021, 10:42:23 AM »
This is quick test, why not try it?

As I recall...maybe yes, maybe no.  Each page starts with new set ID's.  If the shapes get copied in sequential order, then there would be no correlation.  There might still be random cases where the shapes on both pages have same ID.  Also, consider shapes deleted on original page.  There could be gaps.  New page, I believe, has no gaps.

...so, maybe yes, maybe no.  Alternatively, if you need it to be, it won't, but if you don't want it to be, it will.  To be or not to be...
Visio 2019 Pro

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3088
    • Paul Herber's website
Re: Copying a Visio page with shapes, do the shapes retain their ID's?
« Reply #2 on: July 15, 2021, 11:06:28 AM »
Doing the page copy via the (Visio 2016) ribbon Insert -> Pages -> Duplicate this Page
the shape IDs seem to duplicate correctly.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

Visisthebest

  • Sr. Member
  • ****
  • Posts: 434
Re: Copying a Visio page with shapes, do the shapes retain their ID's?
« Reply #3 on: July 15, 2021, 12:10:54 PM »
Thank you go to know how Visio behaves with page duplications and Shape IDs!
Visio 2021 Professional

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3088
    • Paul Herber's website
Re: Copying a Visio page with shapes, do the shapes retain their ID's?
« Reply #4 on: July 15, 2021, 12:16:17 PM »
It's a guess, it's what it does in that instance, under those circumstances. MS may change it.
See Wapperdude's post. Possibly maybe perhaps.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4046
  • Ideas Visio-lized into solutions
Re: Copying a Visio page with shapes, do the shapes retain their ID's?
« Reply #5 on: July 15, 2021, 12:28:15 PM »
This was such a simple test, takes longer to ask question and receive answer and weed thru what's true or not.

Back at my computer, took less than 5 minutes to create test cases.  Whether you duplicate as Paul indicates or right click on page tab and select Duplicate, results were identical.

Placed 10 shapes on 1st page.  Duplicated.  ID's were preserved.  (Each shape displays its ID.)
Note, the 10 shapes were dispersed randomly, so there was no logical orderr to their placement.  Thus, duplication was not based upon some sort of scanning algorithm.

Next, deleted at random a couple shapes, then duplicated the page.  Order and IDs were still preserved, including ID sequence gaps.  Selected and duplicated a shape before any gaps; it's assigned ID was the next at the END of the full sequence.  So, reusing/gap filling is not done either. 

Barring a change by M$, this is how things are as of V2019 desktop.
« Last Edit: July 15, 2021, 12:33:32 PM by wapperdude »
Visio 2019 Pro