I'm trying to uniquely identify a Revit model (get a project's GUID), which I presume would mean using a Document's UniqueId. The following returns the same string, regardless of what model is active:
uiApp.ActiveUIDocument.Document.ProjectInformation.UniqueId;
... where uiApp is the UIApplication from ExternalCommandData.Application. I've also noticed that the string returned is the same even between Revit sessions and creating new projects from scratch.
Any help would be appreciated!
Solved! Go to Solution.
Solved by gimpert. Go to Solution.
Yes, I can confirm that the UniqueId property for some Revit documents are identical, I also found that some Revit documents have different GUID.
So you may need to add a shared parameter , and store the newly generated GUID for that project.
Hope this helps.
Joe,
Thanks for confirming. I ended up adding my own GUID to the document element using the Revit extensible storage tools. I'd imagine a shared parameter would certainly work, too.
Regards,
Adam