title: How can I label curves using NX Open C#?
body: <p>I am <em>new</em> to NX Open journals and coding in general, and I have tried to accomplish something with studying, but now I am in need of some guidance.</p>
  <p>I want to add code that will label these curves that it has found as just &quot;Curve 1&quot;, &quot;Curve 2&quot;, &quot;Curve 3&quot; , ... etc... on the actual Math model. How can I achieve this?</p>
  <p>Something <em>similar</em> to an outcome of what I want is:</p>
  <p><a href="https://i.stack.imgur.com/ErMwu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ErMwu.png" alt="Wanted outcome" /></a></p>
  <p>So far, I wrote the code of identifying the curves and counting how many total curves there are:</p>
  <pre><code>using NXOpen;
  using NXOpenUI;
  using System;
  
  internal static partial class NXJournal
  {
      public static void Main (){
  
          Session theSession = Session.GetSession();
  
          Part workpart = theSession.Parts.Work;
  
          int numCurve = 0;
  
          foreach (NXOpen.Curve cur in workpart.Curves) // Code for finding the facet bodies
          {
              numCurve = numCurve + 1; // Counting how many in layer # with color #
  
              // Put labeling code here
  
          }
          // Then it will repeat
  
          Guide.InfoWriteLine(&quot;This analysis has&quot; + numCurve + &quot;.&quot;);
      }
  }
  </code></pre>
  <p>However, this code only adds up a total amount of curves and does not label them on the math model.</p>