-1

Visio Shape object have ID and UniqueID properties.

ID is a counter, UniqueID is a GUID.

Visio Page have only ID propery.

Is it a some GUID for Page, auto generated by Visio by default (because my app can't modify the document)?

Y.N
  • 4,231
  • 4
  • 26
  • 49

1 Answers1

0

Sort of. Try:

page.PageSheet.UniqueID(visGetOrMakeGUID)

It's like the one you have for shapes. But for pages. See more details on UniqueID here

Nikolay
  • 7,487
  • 2
  • 18
  • 38
  • This operation recreates the GUID's every time. By default, PageSheet have empty GUID, is it ? – Y.N Jan 14 '16 at 23:40
  • Each `UniqueID(visGetOrMakeGUID)` generates the new GUID – Y.N Jan 14 '16 at 23:48
  • Check the docs.. link in the reply. It works the same for pages and shapes. Just tried: `ActivePage.PageSheet.UniqueID(visGetOrMakeGUID)`- always returns the same GUID. Am I missing something? – Nikolay Jan 14 '16 at 23:50
  • If think I need to save the doc after `MakeGUID` – Y.N Jan 14 '16 at 23:57
  • Now done, Saving does store the generated guid. But for my task I need the guid what already exists in visio doc, because my app can't modify the doc. – Y.N Jan 15 '16 at 00:00
  • The guis do not exist by default (same for shapes, btw)... You can make sure that they do not exist by e.g. saving file as XML and checking it's content - no guids by default. – Nikolay Jan 15 '16 at 00:02