Hot Door CORE Forum

Full Version: document dictionary
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Could someone provide some simple sample code for accessing a document's dictionary, storing a few persistent settings (floats and bools), and retrieving them again? I do understand that I need to track notifiers for when documents are created, opened, closed, etc.

I found that a document's dictionary is accessible via the SDK's document suite, but found no dictionary member in the CORE document class. Does a default dictionary already exist, and is it acceptable practice for more than one plugin to store data there?

Any guidance would be very much appreciated. -- rj
I found the dictionary function in the CurrentDocument class (maybe a future version of doxygen will have a more robust search), which should get me started. Creating my own dictionary within the document dictionary strikes me as a responsible approach, but (full disclosure) dictionaries is an area I've never explored before. I've never been able to find more than technical data on dictionaries so I hope my adventures here don't turn into a menace to other people's data. ;-)
(07-14-2016, 07:18 AM)Rick Johnson Wrote: [ -> ]Creating my own dictionary within the document dictionary strikes me as a responsible approach ...

Yep, that's the right thing to do. Make sure you give your subdictionary a reasonably unique name (e.g. with some prefix based on your plugin name).