Is there a way to delete all measurements with python?
If you have any measurements in your scene you can run this to get the lengths of them, but I don't know how to delete them.
import bpy
lengths = []
ruler_data = bpy.data.grease_pencils["Annotations"].layers['RulerData3D']
frame = ruler_data.frames[0]
for stroke in frame.strokes:
p1, p2 = stroke.points[0], stroke.points[-1]
length = (p1.co - p2.co).length
lengths.append(length)
for i in lengths:
print(i)