I had a look at your sandbox and I noticed you’re using the old viewer version. I strongly recommend you move to API 2.0, which you can find on npm under the viewer-next tag.
Here is an example sandbox which shows a basic usage for the measurement tool under API 2.0.
If you’re still having issues in you application, let us know. Possibly even add any errors/warnings you might get in the browser console
Hi @alex .Thank you for your help. I have already solved this problem by uninstalling the ‘three’ package and install the latest speckle/viewer library . However, I still have one question: how can I remove existing dimension annotations in the new version of the viewer?
I need to get the selected dimension first and call measurements.removeMeasurement() or can just need to call the measurements.removeMeasurement() to remove all measutement? Thanks!
The current API does not provide any way of removing all measurements programmatically. removeMeasurement from the MeasurementsExtension will remove any selected measurement, or the ongoing measurement if there is not measurement selected.
We will iterate on the measurements extension soon, and we’ll add means of better programmatic control over measurements. Until then, the way you removed them should be fine, nice going!