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_update_one_view(DrawingTag, TopDrawViewTag); UF_terminate();

NX二次开发-UFUN工程图初始化视图信息UF_DRAW_initialize_view_info的更多相关文章

  1. NX二次开发-UFUN工程图导入视图UF_DRAW_import_view

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <u ...

  2. NX二次开发-UFUN工程图更新视图UF_DRAW_update_one_view

    NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <u ...

  3. NX二次开发-UFUN获取图纸视图最大边界和视图中心点UF_DRAW_ask_view_borders

    NX9+VS2012 //获得视图的最大边界 ]; UF_DRAW_ask_view_borders(view_tag[j], view_borders); //获得视图原点 ]; ViewOrigi ...

  4. NX二次开发-UFUN工程图插入PNG图片UF_DRF_create_image_from_file

    #include <uf.h> #include <uf_drf.h> UF_initialize(); //插入PNG char* file_name = "D:\ ...

  5. NX二次开发-UFUN工程图表格注释section转tag函数UF_TABNOT_ask_tabular_note_of_section

    NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...

  6. NX二次开发-UFUN工程图表格注释获取某一行的tag函数UF_TABNOT_ask_nth_row

    NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...

  7. NX二次开发-UFUN工程图表格注释获取某一列的tag函数UF_TABNOT_ask_nth_column

    NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...

  8. NX二次开发-UFUN工程图表格注释获取某一行某一列的tag函数UF_TABNOT_ask_cell_at_row_col

    NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...

  9. NX二次开发-UFUN工程图表格注释写入文本内容UF_TABNOT_set_cell_text

    NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...

随机推荐

  1. hdu 3374 最大最小表示法 next

    题目大意: 就是求一个串的最大最小表示法的开始下标,然后求有多少个做大最小表示,输出格式为 最小表示下标 它的个数 最大表示下标 它的个数 基本思路: 最小最大表示法模板题,然后求一下循环节,很容易知 ...

  2. Yii2使用PHPExcel读取excel

    个人使用过程中保存一些使用PHPExcel的经验,以便后来翻阅:与PHP的Yii框架结合,可以轻松使用.而且根本不用网上所说的修改Yii的自动加载文件等方法.具体使用方法:下载phpoffice ht ...

  3. CF566E Restoring Map

    题意:乱序给你树上的每一个节点与之相距<=2的节点集合(并不知道这具体是哪个节点). 还原整棵树. 标程: #include<bits/stdc++.h> #define P pai ...

  4. oscache缓存

    oscache 使用总结 Posted on 2009-05-22 22:45 青果 阅读(1270) 评论(2)  编辑  收藏 所属分类: 技术点滴  前阵子对公司网站进行了性能优化,其中,有一项 ...

  5. Spring Boot 集成Mybatis实现多数据源

    静态的方式 我们以两套配置方式为例,在项目中有两套配置文件,两套mapper,两套SqlSessionFactory,各自处理各自的业务,这个两套mapper都可以进行增删改查的操作,在这两个主MYS ...

  6. leetcode-按奇偶排序数组II

    Python解决方法: class Solution(object): def sortArrayByParityII(self, A): j = 1 for i in xrange(0, len(A ...

  7. js获取地址栏的参数

    //获取url参数 window.getParam = function(url, id) { url = url+ ""; var regstr = "/(\\?|\\ ...

  8. Attribute 实现Aop

    1.先定义一个 拦截属性 AopAttribute using System; using System.Collections.Generic; using System.Linq; using S ...

  9. bzoj 2084

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=2084 这道题很容易想到就是一个变种的最长回文字串, 不过回文的规则变成了s[i + p[i] ...

  10. linux IPC共享内存

    共享内存相关函数 获得一个共享存储标识符 #include <sys/ipc.h> #include <sys/shm.h int shmget(key_t key, size_t ...