NX二次开发-NXOPEN更改工程图视图名字baseView1->SetName("LSY");
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); //视图重命名
Drawings::BaseView *baseView1(dynamic_cast<Drawings::BaseView *>(NXOpen::NXObjectManager::Get(TopDrawViewTag)));
baseView1->SetName("LSY"); //更新视图
UF_DRAW_update_one_view(DrawingTag, TopDrawViewTag);
UF_DRAW_update_one_view(DrawingTag, RightViewTag); UF_terminate();

NX二次开发-NXOPEN更改工程图视图名字baseView1->SetName("LSY");的更多相关文章
- NX二次开发-UFUN移动工程图视图UF_DRAW_move_view
#include <uf.h> #include <uf_draw.h> #include <uf_drf.h> #include <uf_obj.h> ...
- NX二次开发-NXOPEN设置工程图表格注释字体workPart->Fonts()->AddFont("chinesef_fs", NXOpen::FontCollection::TypeNx);
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- NX二次开发-NXOPEN创建工程图表格Annotations::TableSectionBuilder *tableSectionBuilder1;
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- NX二次开发-UFUN由工程图视图tag获取图纸页tag UF_DRAW_ask_drawing_of_view
#include <uf.h> #include <uf_draw.h> #include <uf_drf.h> #include <uf_obj.h> ...
- NX二次开发-UFUN移动工程图视图到另一个图纸页UF_DRAW_move_view_to_drawing
#include <uf.h> #include <uf_draw.h> #include <uf_obj.h> UF_initialize(); //找名字获取视 ...
- NX二次开发-NXOPEN将工程图转成PDF文件
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <NXOpen/PrintPDFBuilder.hxx& ...
- NX二次开发-NXOpen读取工程图注释note1->GetText();
NX9+VS2012 #include <uf.h> #include <uf_drf.h> #include <NXOpen/Annotations_Note.hxx& ...
- NX二次开发-UFUN获取工程图视图边界线颜色UF_DRAW_ask_border_color
#include <uf.h> #include <uf_draw.h> #include <uf_ui.h> UF_initialize(); ; UF_DRAW ...
- NX二次开发-UFUN获取工程图视图边界线是否显示UF_DRAW_ask_border_display
#include <uf.h> #include <uf_draw.h> #include <uf_ui.h> UF_initialize(); logical b ...
随机推荐
- BD贴吧图片爬虫
#encoding:utf-8 import urllib import urllib.request from lxml import etree class Spider(object): def ...
- CSS3 @media 查询(制作响应式布局)
这里简单说明一下@media 查询. 详细说明文档:http://www.runoob.com/cssref/css3-pr-mediaquery.html 使用 @media 查询,你可以针对不同的 ...
- 工程师技术(二):postfix基础邮件服务、postfix空客户端邮件服务、搭建mariadb数据库系统、配置一个数据库、使用数据库查询
一.postfix基础邮件服务 目标: 本例要求在虚拟机server0上配置 postfix 基础服务,具体要求如下: 1> 监听本机的所有接口 2> 将邮件域和邮件服务主机名都改为 ...
- NOIp2018集训test-10-20 (bike day6)
B 君的第一题 lanzhou $x^{\frac{p-1}{2}}\equiv 1(mod\ p)$ $x\equiv x*x^{\frac{p-1}{2}} (mod\ p)$ $x\equiv ...
- Makefile中的函数
Makefile 中的函数 Makefile 中自带了一些函数, 利用这些函数可以简化 Makefile 的编写. 函数调用语法如下: $(<function> <arguments ...
- 工具类--Excel 导出poi
实现功能 --批量导出excel 文件,配置一个sheet多少条数据,根据查询数据量的多少确定生成几个sheet页. pom 文件导入ExcelUtils工具包,依赖于poi包. <!-- ht ...
- Python中使用item()方法遍历字典的例子
Python中使用item()方法遍历字典的例子 这篇文章主要介绍了Python中使用item()方法遍历字典的例子,for...in这种是Python中最常用的遍历字典的方法了,需要的朋友可以参考下 ...
- 基础补充(四)——流程控制之if、while、for,break与continue
流程控制 一.流程控制之if……else…… if 条件1: 缩进的代码块 elif 条件2: 缩进的代码块 elif 条件3: 缩进的代码块 ...... else: 缩进的代码块 二.流程控制之 ...
- Python中两大神器&exec() &eval()
一.神器1 -- 内置函数eval eval是python中的内置函数,它的作用是将字符串变为所对应的表达式,也相当于一个功能代码加双引号变为字符串,而eval又将字符串转为相应的功能,它在使用过程中 ...
- spring boot jpa 多表关联 @OneToOne @OneToMany @ManyToOne@ManyToMany
1.一对一关联 @OneToOne import lombok.Data; import javax.persistence.*; /** * @Author: GWL * @Description: ...