Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

246
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda