Storing user data in a project file

Storing user data in a project file

r.polyakov.unkeng
Contributor Contributor
427 Views
4 Replies
Message 1 of 5

Storing user data in a project file

r.polyakov.unkeng
Contributor
Contributor

Hi there!

For example, is it possible to save a list of elements in a project so that they can be selected later, even after restarting Revit?
I was thinking about using a hidden shared parameter, but are there any other options?

Accepted solutions (1)
428 Views
4 Replies
Replies (4)
Message 2 of 5

caroline.gitonga
Autodesk
Autodesk
Accepted solution

Hi @r.polyakov.unkeng,

Revit API provides an exciting and powerful extensible storage feature. The feature offers a completely new storage facility for applications which is completely invisible to the user. This functionality can be used to replace the technique of storing data in hidden shared parameters. Kindly, refer to these links to learn and understand the whole concept of Extensible storage and how you can achieve more using it: 

https://knowledge.autodesk.com/support/revit/learn-explore/caas/CloudHelp/cloudhelp/2014/ENU/Revit/f...

https://thebuildingcoder.typepad.com/blog/2011/04/extensible-storage.html,

 

Carol Gitonga, Developer Advocacy and Support, ADN Open
Message 3 of 5

r.polyakov.unkeng
Contributor
Contributor
Thanks @caroline.gitonga , it's excellent!
Message 4 of 5

r.polyakov.unkeng
Contributor
Contributor
Do I understand correctly that the valueType for AddMapField() cannot be a collection or an array?
0 Likes
Message 5 of 5

caroline.gitonga
Autodesk
Autodesk

 SchemaBuilder.AddArrayField() method can be used to create a field containing an array of values in the Schema,

SchemaBuilder.AddMapField() method can be to create a field containing an ordered key-value map in the Schema

Carol Gitonga, Developer Advocacy and Support, ADN Open
0 Likes