Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best practices for local data storage

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
CollinJoseph0258
1011 Views, 3 Replies

Best practices for local data storage

What are the best practices for storing data locally for Revit addins? (for example: user preferences or authentication information)

 

In particular, is there any recommended location or format?

Labels (2)
3 REPLIES 3
Message 2 of 4

It depends completely on your requirements and personal preferences.

  

Personally, I favour text over binary, and JSON over XML.

 

Here are two explorations comparing storage of a very small amount of add-in settings data in JSON and XML respectively:

 

https://thebuildingcoder.typepad.com/blog/2016/09/hololens-escape-path-waypoint-json-exporter.html

 

Subsidiary external Settings command:

    

  • Display modal Windows form
  • Implement form validation using ErrorProvider class, Validating and Validated events
  • Store add-in option settings in XML using the .NET System.Configuration.ApplicationSettingsBase class
  • Store add-in option settings in JSON using custom solution and JavaScriptSerializer class

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4

With visual studio the easiest thing is to use Properties -> Settings.settings from the solution explorer.  

Message 4 of 4

Thank you for your replies, they are very helpful!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report