Open wallabyway opened 4 years ago
Here's the two APIs for save and restore: https://github.com/wallabyway/forge-markup-measure-extensions/blob/325006d4d527496b9cf17b2022cc1e3a87498482/Measure/Measure.js#L268-L281
Create some measurements, then serialize them to a string before you save the string to a database, like this:
ext = NOP_VIEWER.getExtension("Autodesk.Measure") list = ext.getMeasurementList(); szList = JSON.stringify(list)
sz = string from database ext.setMeasurements(JSON.parse(sz))
Is this also persisted in IndexDB or local storage to retrieve it even after page refresh?
API
Here's the two APIs for save and restore: https://github.com/wallabyway/forge-markup-measure-extensions/blob/325006d4d527496b9cf17b2022cc1e3a87498482/Measure/Measure.js#L268-L281
Example:
1. Save to Database
Create some measurements, then serialize them to a string before you save the string to a database, like this:
2. Restore from Database