Visio Guy

Visio Discussions => Programming & Code => Topic started by: Visisthebest on September 24, 2020, 08:31:29 AM

Title: Visio Shape UniqueID’s
Post by: Visisthebest on September 24, 2020, 08:31:29 AM
When I add a UniqueID GUID to a shape, I notice that when this shape is copied the copy has an empty-string UniqueID field (this is very desirable behavior).

My question is, will a new shape or a copied shape always have an empty-string UniqueIQ field or is there a setting in Visio that will generate a new UniqueID for a copied/created shape?

I am asking because if I can count on this behavior, then I can check if a shape has an empty-string UniqueID and know it has not been generated by our own code but created/copied by the user by hand. Very useful to know if this is always the case.
Title: Re: Visio Shape UniqueID’s
Post by: Paul Herber on September 24, 2020, 12:28:21 PM
The copied shape will always have a blank uniqueID. It cannot have the same ID as the original, as it would not then be unique!
Title: Re: Visio Shape UniqueID’s
Post by: Visisthebest on September 24, 2020, 01:05:56 PM
Thank you Paul, but also not get a new UniqueID is what I wanted to be sure about! (unless this ID is added by our own code of course)