Are there any OOTB methods to
- serialize the current view to json/xml
- restore the view back from json/xml?
Thanks,
ven
Are there any OOTB methods to
Thanks,
ven
Hello @venkat. Communicator does not have out-of-the-box functions for serializing and deserializing the Communicator.View object. It is possible to serialize/deserialize one part of the View object, that being the Camera through the methods Camera.toJson() and Camera.fromJson().
Hi @venkat,
As Tino mentioned, you can save and restore the camera using the above mentioned APIs. You can also use the Communicator.MarkupManager class to save off various parts of the view. The class as a function called exportMarkup() that will save off the following:
I believe that in the latest version, we also safe the state of cutting planes in the view, but you’ll have to verify that. You can create a view in the in the MarkupManager that will save off model state, which you can then serialize to json and reload later. You can read more about all of this here: Markup Basics — HOOPS Communicator 2023 SP1 Documentation