1 Reply Latest reply on Nov 22, 2014 5:03 PM by Daniel Andersson

    Get distance between two points

    Manu Rao

      I would like to write a macro that measures the distance between two points within a sketch. It will then calculate the number of pitches between them given a pitch that is specified by the user.

      I'm doing okay with the calculation part but unsure how to prompt the user to select the points while the macro is running. The end result should be something like this.

       

      Precondition: Sketch open for editing

       

      "Select start point"

      'Wait till user selects a point

       

      "Select end point"
      'Wait till user selects end point

       

      'Measure distance between points and perform calculations.

       

      'Places sketchpoints at appropriate locations.

      'Display number of pitches