How would I label these lines using coding?
I have already figured out how to identify and count up how many lines exist using this code:
using NXOpen;
using System;
public class FailedRegionCounting
{
public static void Main()
{
Session theSession=Session.GetSession();
Part workpart=theSession.Parts.Work;
int numLine = 0;
foreach (NXOpen.Curve tempFeat in workpart.Curves)
{
string name = tempFeat.Name;
string a = "Line";
if (name.Contains(a))
{
numLine = numLine + 1;
}
}
Guide.InfoWriteLine("This analysis has " + numLine + " of Lines.");
}
}
However, I would like to learn how I would label these lines on NX.
This is somewhat of a result I desire:
You can use PMI notes for achieving this.
If you want to display temporary names, then there are some functions where you can create temporary Names for the curves.