zoukankan      html  css  js  c++  java
  • NX二次开发-使用NXOPEN C#手工搭建开发环境配置

    新建类库

    进来后编译代码,成功

     添加NXOPEN的库到项目中

     

     

     不同NX版本,可能dll所在位置不一样,NX11以上版本在NXBIN这里,NX11以下版本大概在UGII。

     添加头文件

    using NXOpen;
    using NXOpen.Utilities;
    using NXOpen.UF;

    添加源代码

     1 public static Session theSession;
     2 public static UFSession theUfSession;
     3 public static UFUi theUFUi;
     4 
     5 public static int Main()
     6 {
     7     theSession = Session.GetSession();
     8     theUfSession = UFSession.GetUFSession();
     9     theUFUi = theUfSession.Ui;
    10 
    11     theUFUi.DisplayMessage("Hello,world!", 1);
    12 
    13     FeatureSigns sign = FeatureSigns.Nullsign;//定义布尔
    14     double[] cornet_pt = { 100.0, 0.0, 0.0 };//定义原点
    15     string[] edge_len = { "100.0", "100.0", "100.0" };//定义长宽高
    16     Tag blk_obj_id = Tag.Null;
    17     theUfSession.Modl.CreateBlock1(sign, cornet_pt, edge_len, out blk_obj_id);
    18 
    19     return (0);
    20 }
    21 
    22 public static int GetUnloadOption(string dummy)
    23 {
    24     return UFConstants.UF_UNLOAD_IMMEDIATELY;
    25 }
    26 
    27 Caesar卢尚宇
    28 2020年2月24日

     

  • 相关阅读:
    uva 11078
    hdu1520(树状dp)
    从Markov Process到Markov Decision Process
    剑指Offer系列编程题详解全集
    L1正则和L2正则的区别详解
    协方差详解
    牛顿法和梯度下降法的比较
    C++ const各种用法总结
    Exploration and Exploitation
    RL Algorithm Components
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/12358851.html
Copyright © 2011-2022 走看看