Selection changes after copy and paste

A

Andy

I am selecting some shapes on a page in my diagram. I then take a copy
of the active window selection. The selection is then pasted onto a
different page in the same diagram. I need to do some processing on
both sets of shapes once the paste is complete.

However, it seems the order of shapes in the selection has changed
following the paste. So I am unable to iterate through both
selections. Also, I am using the UniqueID, but this is not carried
over to the pasted shapes.

Anyone have a good idea for matching up shapes in the 2 selections or
am I going to need to store some information of my own to match up
these shapes.

Thanks
 
A

Al Edlund

well, if the uniqueid wasn't different, then it wouldn't be unique! you're
correct in that you'll have to come up with something else to identify the
shapes as an identifier.
al
 
A

Andy

well, if the uniqueid wasn't different, then it wouldn't be unique! you're
correct in that you'll have to come up with something else to identify the
shapes as an identifier.
al

was hoping that the unique id wouldn't change until i called it with
visGetOrMakeGUID.
 
M

Mark Nelson [MS]

Andy, check out this blog post. I had to work around this issue when
creating the SmartPaste utility. I used the Index property to figure out
the order. Index is the z-order, which Visio preserves on paste. Look at
the VBA code for an example.

http://blogs.msdn.com/visio/archive/2006/11/14/smarter-paste-between-pages.aspx


--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Andy

Andy, check out this blog post. I had to work around this issue when
creating the SmartPaste utility. I used the Index property to figure out
the order. Index is the z-order, which Visio preserves on paste. Look at
the VBA code for an example.

http://blogs.msdn.com/visio/archive/2006/11/14/smarter-paste-between-...

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top