NX9+VS2012

 #include <uf.h>
#include <uf_draw.h>
#include <uf_obj.h>
#include <uf_part.h> UF_initialize(); //新建工程图(A4图纸)
char* DrawingName = "Sheet1";//设置图纸名字
UF_DRAW_info_t DrawingInfo;//设置图纸大小、投影视角、视图比例等
DrawingInfo.size_state = UF_DRAW_METRIC_SIZE;//设置图纸类型
DrawingInfo.size.metric_size_code = UF_DRAW_A4;//设置图纸大小
DrawingInfo.drawing_scale = 1.0;//设置比例
DrawingInfo.units = UF_PART_METRIC;//设置单位
DrawingInfo.projection_angle = UF_DRAW_FIRST_ANGLE_PROJECTION;//设置投影视角
tag_t DrawingTag = NULL_TAG;
UF_DRAW_create_drawing(DrawingName, &DrawingInfo, &DrawingTag); //导入视图(创建Top视图)
//找名字获取视图的Tag
tag_t TopViewTag = NULL_TAG;
UF_OBJ_cycle_by_name_and_type(UF_PART_ask_display_part(), "Top", UF_view_type, false, &TopViewTag); UF_DRAW_view_info_t TopViewInfo;
UF_DRAW_initialize_view_info(&TopViewInfo);//初始化视图信息
double TopDwgPoint[] = {150.0, 160.0};
tag_t TopDrawViewTag = NULL_TAG;
UF_DRAW_import_view(DrawingTag, TopViewTag, TopDwgPoint, &TopViewInfo, &TopDrawViewTag); //添加投影视图
//UF_DRAW_project_infer = 0,自动判断
//UF_DRAW_project_above,上
//UF_DRAW_project_right,右
//UF_DRAW_project_below,下
//UF_DRAW_project_left左
UF_DRAW_proj_dir_t RightProjection = UF_DRAW_project_right;
double RightDwgPoint[] = {35.0, 160.0};
tag_t RightViewTag = NULL_TAG;
UF_DRAW_add_orthographic_view(DrawingTag, TopDrawViewTag, RightProjection, RightDwgPoint, &RightViewTag); //更新视图
UF_DRAW_update_one_view(DrawingTag, TopDrawViewTag);
UF_DRAW_update_one_view(DrawingTag, RightViewTag); UF_terminate();

NX二次开发-UFUN添加工程图投影视图UF_DRAW_add_orthographic_view的更多相关文章

  1. NX二次开发-UFUN获取工程图所有视图tag UF_DRAW_ask_views

    #include <uf.h> #include <uf_draw.h> #include <uf_drf.h> #include <uf_obj.h> ...

  2. NX二次开发-UFUN将工程图转成CGM和PDF文件UF_CGM_export_cgm

    文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...

  3. NX二次开发-UFUN新建工程图UF_DRAW_create_drawing

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize ...

  4. NX二次开发-UFUN打开工程图UF_DRAW_open_drawing

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize ...

  5. NX二次开发-UFUN删除工程图UF_DRAW_delete_drawing

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize ...

  6. NX二次开发-UFUN获取工程图的数量和tag UF_DRAW_ask_drawings

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> #include < ...

  7. NX二次开发-UFUN获取工程图详细信息UF_DRAW_ask_drawing_info

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize ...

  8. NX二次开发-UFUN将工程图中的点坐标映射到建模绝对坐标UF_VIEW_map_drawing_to_model

    #include <uf.h> #include <uf_ui.h> #include <uf_draw.h> #include <uf_view.h> ...

  9. NX二次开发-UFUN创建工程图注释UF_DRF_create_note

    NX9+VS2012 #include <uf.h> #include <uf_drf.h> #include <NXOpen/Annotations_Note.hxx& ...

随机推荐

  1. JS判断浏览器类型的方法总结(IE firefox chrome opera safari)

    JS判断浏览器类型的方法总结,可判别当前客户端所使用的浏览器是ie,firefox,safari,chrome或者是opera,另外js可以精确判断到ie浏览器的版本,依然直接上代码,需要的朋友可按照 ...

  2. 【leetcode】328. Odd Even Linked List

    题目如下: Given a singly linked list, group all odd nodes together followed by the even nodes. Please no ...

  3. 练习 |跟着Python达人

    [学习Python都是用来干嘛的?] 朱卫军 数据分析师 NEV行业 python那些事儿众号主 网址 https://www.zhihu.com/question/34098079/answer/8 ...

  4. Vue学习笔记【14】——自定义指令

    1.自定义全局和局部(私有)自定义指令 // 自定义全局指令 v-focus,为绑定的元素自动获取焦点: ​ Vue.directive('focus', { ​ inserted: function ...

  5. 【NIO】IO与NIO的区别

    一.概念 NIO即New IO,这个库是在JDK1.4中才引入的.NIO和IO有相同的作用和目的,但实现方式不同,NIO主要用到的是块,所以NIO的效率要比IO高很多.在Java API中提供了两套N ...

  6. 最常用的C++序列化方案:protobuf

    参考链接:最常用的两种C++序列化方案的使用心得(protobuf和boost serialization) [c++] Google Protobuf库1. 什么是序列化?程序员在编写应用程序的时候 ...

  7. Xcode Command Line Tools for Mac OS X 10.9 Mavericks

    by Daniel Kehoe Last updated 28 December 2013 How to install Apple Xcode Command Line Tools for Mac ...

  8. Arduino与水泵实验+土壤湿度传感器

    1 水泵实验我们这里是使用的继电器控制的水泵,注意再实验的时候电池的电压不要超过6v,太大容易烧毁水泵,如果是长时间的使用水泵,要注意将水泵放入水中,这样可以达到给水泵降温的效果.1.全新5V继电器模 ...

  9. 30天轻松学习javaweb_通过javac编译java文件

    通过javac编译java文件1.先导入需要引用的包D:\Program Files (x86)\apache-tomcat-7.0.53\webapps\test\WEB-INF\classes&g ...

  10. python pip时openssl的错误

    也不知道看了哪个方法弄成这个样子的,也没办法,下面方法可用 https://blog.csdn.net/chr1341901410/article/details/80995451