我该如何使用编码来标记这些行?
我已经知道了如何使用下面的代码来识别和统计存在的行数:
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.");
}
}但是,我想知道如何在NX上标记这些行。
这在某种程度上是我想要的结果:

发布于 2021-07-30 19:22:30
UFObj.DispProps props =新UFObj.DispProps();props.color = 186;double[] loc = {rcpPoint.X+5,rcpPoint.Y+5,rcpPoint.Z+5};theUFSession.Disp.DisplayTemporaryText( Tag.Null,UFDisp.ViewType.UseWorkView,inx.ToString(),loc,UFDisp.TextRef.Middlecenter,ref props,10.0,1);
https://stackoverflow.com/questions/68340641
复制相似问题