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日

     

  • 相关阅读:
    day7随笔
    day6随笔
    day5笔记
    uniapp 全屏蒙版下的其他view禁止滑动
    uniapp scroll-view 组件右侧的滚动条
    uni 组件 头部
    根据两点的经纬度查询两点间的距离
    仅供学习使用的一些 相关vue类
    仅供学习使用的一些样式+行为
    百度地图简单调用
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/12358851.html
Copyright © 2011-2022 走看看