Encouraging evaluation when a document is opened
-
I have several object plugins and they all have the same problem - my custom caching functions work as expected until the document is saved and reopened. In that case the generator object returns an empty object. is there any kind of event I could use to force an update?
-
Hi,
For your next question, please read the Forum Guidelines, especially the structure of a question. This help us to understand what you are trying to achieve.
In your case, i can only guess.
You are implementing an ObjectData and you are storing information inside your class. This information isn't stored in the BaseContainer of your object, so it's not saved with the document.
Two solutions:
-
storing the information inside the BaseContainer of the object. For that you need to retrieve on pluginID so you will be sure that your information will not be erased by something else.
-
Implementing the Read/Write/CopyTo functions. Most of the case, when you need to implement one, you need all three. Those function allow to write the data when you save the document, read it when you open it and CopyTo allow to copy the data when you copy the object.
Question that could help:
- What kind of object are you creating?
- What's the workflow?
- What's the final goal?
You think you need to force the evaluation of your object when you open a document, but it might be not the case.
Cheers,
Manuel -
-
Hello @pyr,
without any further replies or questions, we will consider this thread as solved by Thursday and flag it accordingly.
Thank you for your understanding,
Ferdinand