Hi all,
I am new to c# scripting in grasshopper and have issues with the DivideCurveByLength method. I keep getting the following error :
" 1. Error (CS0103): The name ‘tempPoints’ does not exist in the current context (line 142)"
// divide curve by length
for( int i = 0; i < primaryLine.BranchCount; i++){
for( int j = 0; j < primaryLine.Branches[i].Count; j++){
LineCurve tempLine = primaryLine.Branches[i][j];
Point3d[] tempPoints;
try{
tempLine.DivideByLength(500, true, out tempPoints);
}catch (Exception e){
Print("The curve is 500mm or less");
}
if(tempPoints != null){
Print(tempPoints.Length.ToString());
}
}
Any advice would be greatly appreciated!!