Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
How can I label a line in NX Open C#?

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:

Enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

  1. You can use PMI notes for achieving this.

  2. If you want to display temporary names, then there are some functions where you can create temporary Names for the curves.

     UFObj.DispProps props = new 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);
    
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!