×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

C#.net programme for nx 6

C#.net programme for nx 6

C#.net programme for nx 6

(OP)
dear
i have to required program for the click button on refresh external spreadsheet which is available in nx 6 at
tools=> expression => refresh external spreadsheet

RE: C#.net programme for nx 6

Dhaval082,

Here's a recorded journal of the operation (NX 9). If this doesn't work in NX 6 it means that the .Net api support for that function was not added until a later NX version.

CODE --> C#

using System;
using NXOpen;

public class NXJournal
{
  public static void Main(string[] args)
  {
    Session theSession = Session.GetSession();
    Part workPart = theSession.Parts.Work;
    Part displayPart = theSession.Parts.Display;
    // ----------------------------------------------
    //   Menu: Tools->Expressions...
    // ----------------------------------------------
    theSession.Preferences.Modeling.UpdatePending = false;
    
    NXOpen.Session.UndoMarkId markId1;
    markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Expression");
    
    theSession.Preferences.Modeling.UpdatePending = false;
    
    int nErrs1;
    nErrs1 = theSession.UpdateManager.DoUpdate(markId1);
    
    // ----------------------------------------------
    //   Menu: Tools->Journal->Stop Recording
    // ----------------------------------------------
    
  }
  public static int GetUnloadOption(string dummy) { return (int)Session.LibraryUnloadOption.Immediately; }
} 

HTH, Joe

RE: C#.net programme for nx 6

(OP)
dear sir
i use this code but some error like dll not found so please tell me how to run this code

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources