I am writing a plugin and want to store custom data from my plugin in the Revit project. I have read up on DataStorage and feel it is the best way to go since it is not dependent on attaching it to another Revit element. The issue I am having is trying to figure out how to attach multiple instances of an Entity/Class to a DataStorage. The following post from Jeremy Tammik has a good explanation of using DataStorage for a Singleton Entity but I want to save multiple instances of an Entity to my project.
In my case I want to create multiple instance of an Entity each with their own fields/parameters to put in to the DataStorage. I'll use the example of a Car as the entity and let's say I wanted to store the make, model, color, and license plate of the car in each Entity. Would it be possible to create multiple instances of a Car entity in the DataStorage?
My backup plan is to create a Schema with redundant Fields with a number for the instance (i.e. CarMake1, CarMake2, etc.) but that seems too messy. I don't think I'll have more than 10-15 instances of my Entity in one project but it would be nice not to have to build in max capacity with a bunch of redundant code.
Thanks,
Joe