Extensible Storage not attached to a Revit Element

Extensible Storage not attached to a Revit Element

Anonymous
Not applicable
1,381 Views
2 Replies
Message 1 of 3

Extensible Storage not attached to a Revit Element

Anonymous
Not applicable

I have been looking through the documentation and examples associated with Extensible Storage. I would like to utilize it in my add-in to save a path to an external word document. All of the examples I have looked at have attached the extensible storage to an element, such as a wall, in the Revit project.  What would I attach the file path too? Are there any examples of using extensible storage to just save a bit of information in a Revit file?

 

Thanks

0 Likes
Accepted solutions (1)
1,382 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution
One place you could store it is the Project Information Element. As long as it's not a family document I think you're guaranteed to have one.

That said, in a workshared environment, this is generally bad practice because as soon as you attach the ES to the project information element, you take ownership of it (or the user calling your function does, more accurately) so now you have editing conflicts.

If this is an operation that happens often, a better way to deal with this is to use the DataStorage class which is a Revit Element which can be created by the API with the static method DataStorage.Create(). You can create as many data storage elements as necessary to cut down on editing conflicts between users.

Alternatively, you could use a shared parameter on project information (same potential editing conflict issues though).

Best Luck,
-Ken
Message 3 of 3

Anonymous
Not applicable

Sounds like a createing a data storage element is the way to go.  Thanks Ken

0 Likes