CAFE

C#

Sample NX Open .NET C# program : test nxmanager batch mode execution

작성자k2ice|작성시간08.11.21|조회수1,564 목록 댓글 0
Date:  4-NOV-2008
Subject:  Sample NX Open .NET C# program : test nxmanager batch mode execution

Note:  GTAC provides programming examples for illustration only, and
assumes that you are familiar with the programming language being
demonstrated and the tools used to create and debug procedures.  GTAC
support professionals can help explain the functionality of a particular
procedure, but we will not modify these examples to provide added
functionality or construct procedures to meet your specific needs.

// Call this batch program from a properly initialized command prompt window:
//   test.exe -pim=yes
// if your site does not use autologin, you will also need to pass credentials
//   test.exe -pim=yes -u=_______ -p=________

// See PR 1692834

using System;
using NXOpen;
using NXOpen.UF;

public class NXJournal
{
  public static void Main(string[] args)
  {
    Session s = Session.GetSession();
    UFSession ufs = UFSession.GetUFSession();
    ListingWindow lw = s.ListingWindow;

    lw.Open();
    lw.WriteLine("Args.Length = " + args.Length.ToString());

    for (int ii = 0; ii < args.Length; ii++)
        lw.WriteLine("args[" + ii.ToString() + "] = " + args[ii]);

    ufs.Ugmgr.Initialize(args.Length, args);

    bool managerActive = false;
    ufs.UF.IsUgmanagerActive(out managerActive);

    lw.WriteLine("NX Manager Active: " + managerActive.ToString());

  }
}
다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼