GlyphsToolMeasurement in Glyphs 2

How can I rewrite this piece of code to make it work on Glyphs 2?

MeasurementHeight = 50
Measurement = NSClassFromString(“GlyphsToolMeasurement”).alloc().init()
result = Measurement.calculateIntersectionsForLayer_startPoint_endPoint_(currLayer, NSMakePoint(-1000, MeasurementHeight), NSMakePoint(3000, MeasurementHeight))

AttributeError: ‘GlyphsToolMeasurement’ object has no attribute ‘calculateIntersectionsForLayer_startPoint_endPoint_’

Take a look in my repository, in the subfolder Test, you will find Report Area scripts that check for the app version and apply different code accordingly.