//Purpose: The purpose of this script is to calculate the arc length of a profile using a radius output from a Profile Circle tool
//and the Distance output calculated in a Feature Dimension tool using 2 Profile Position tools as inputs.
//Declare Variables
double radiusValue, angleValue;
double arcLength;
//Initialize Variables
radiusValue = Measurement_Value(45); //you must change the ID here (45) to the ID of the Profile Circle - Radius measurement
angleValue = Measurement_Value(84); //you must change the ID here (84) to the ID of the Feature Dimension - Distance measurement
//Calculate Arc Length //formula: L = r * theta (in radians)
angleValue = angleValue / 180; //convert to radians
angleValue = angleValue * (22); //convert to radians
angleValue = angleValue / (7); //convert to radians
arcLength = radiusValue * angleValue; //calculate arc length
//Outputs
Output_SetAt(0,arcLength,1);