zoukankan      html  css  js  c++  java
  • NX二次开发-NXOpen窗口打印NXMessageBox&ListingWindow

     1     NX9+VS2012
     2     
     3     #include <NXOpen/NXObject.hxx>
     4     #include <NXOpen/Part.hxx>
     5     #include <NXOpen/PartCollection.hxx>
     6     #include <NXOpen/UI.hxx>
     7     #include <NXOpen/NXMessageBox.hxx>
     8     #include <NXOpen/ListingWindow.hxx>
     9     
    10     using namespace NXOpen;
    11 
    12 
    13     NXMessageBox *mb;
    14     ListingWindow *lw;
    15 
    16     NXOpen::Session *theSession = NXOpen::Session::GetSession();
    17     NXOpen::Part *workPart(theSession->Parts()->Work());
    18     NXOpen::Part *displayPart(theSession->Parts()->Display());    
    19     UI *theUI = UI::GetUI();
    20 
    21     mb = theUI->NXMessageBox();
    22     lw = theSession->ListingWindow();
    23 
    24     //方法1(NXMessageBox)
    25     mb->Show("HelloTitle", NXOpen::NXMessageBox::DialogTypeError, "HelloWorld");//类型1
    26     mb->Show("HelloTitle", NXOpen::NXMessageBox::DialogTypeWarning, "HelloWorld");//类型2
    27     mb->Show("HelloTitle", NXOpen::NXMessageBox::DialogTypeInformation, "HelloWorld");//类型3
    28     mb->Show("HelloTitle", NXOpen::NXMessageBox::DialogTypeQuestion, "HelloWorld");//类型4
    29 
    30 
    31     //方法2(ListingWindow)
    32     lw->Open();
    33     lw->WriteLine("HelloWorld");

  • 相关阅读:
    koller——PGM 基础
    java 类 多态
    java 基础知识
    相关性检验和独立性检验
    IDEA远程连接Hadoop
    sklearn pipeline
    java static
    sklearn learn preprocessing
    数据预处理 简介
    RATE-MAX alpha冲刺第八天
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/10957463.html
Copyright © 2011-2022 走看看