NX二次开发-UFUN工程图表格注释获取某一列的tag函数UF_TABNOT_ask_nth_column
NX9+VS2012 #include <uf.h>
#include <uf_tabnot.h>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/Annotations_TableSectionCollection.hxx>
#include <NXOpen/Annotations_AnnotationManager.hxx>
#include <NXOpen/FontCollection.hxx> UF_initialize(); //创建表格注释
Annotations::TableSection *nullAnnotations_TableSection(NULL);
Annotations::TableSectionBuilder *tableSectionBuilder1;
tableSectionBuilder1 = workPart->Annotations()->TableSections()->CreateTableSectionBuilder(nullAnnotations_TableSection);
NXOpen::Point3d TablePoint(194.0, 17.0, 0.0);
tableSectionBuilder1->Origin()->SetOriginPoint(TablePoint);
tableSectionBuilder1->SetNumberOfColumns();
tableSectionBuilder1->SetNumberOfRows();
tableSectionBuilder1->SetRowHeight(20.0);
tableSectionBuilder1->SetColumnWidth();
tableSectionBuilder1->Commit();
NXObject *nXObject1;
nXObject1 = tableSectionBuilder1->Commit();
tableSectionBuilder1->Destroy(); //section转tag
tag_t TabularNote = NULL_TAG;
UF_TABNOT_ask_tabular_note_of_section(nXObject1->Tag(), &TabularNote); //获取第一行的Tag
tag_t Row0Tag = NULL_TAG;
UF_TABNOT_ask_nth_row(TabularNote, , &Row0Tag); //获取第二行的Tag
tag_t Row1Tag = NULL_TAG;
UF_TABNOT_ask_nth_row(TabularNote, , &Row1Tag); //获取第一列的Tag
tag_t Column0Tag = NULL_TAG;
UF_TABNOT_ask_nth_column(TabularNote, , &Column0Tag); //获取第二列的Tag
tag_t Column1Tag = NULL_TAG;
UF_TABNOT_ask_nth_column(TabularNote, , &Column1Tag); //得到第一行第一列单元格的Tag
tag_t Cell0Tag = NULL_TAG;
UF_TABNOT_ask_cell_at_row_col(Row0Tag, Column0Tag, &Cell0Tag); //得到第一行第二列单元格的Tag
tag_t Cell1Tag = NULL_TAG;
UF_TABNOT_ask_cell_at_row_col(Row0Tag, Column1Tag, &Cell1Tag); //得到第二行第一列单元格的Tag
tag_t Cell2Tag = NULL_TAG;
UF_TABNOT_ask_cell_at_row_col(Row1Tag, Column0Tag, &Cell2Tag); //得到第二行第二列单元格的Tag
tag_t Cell3Tag = NULL_TAG;
UF_TABNOT_ask_cell_at_row_col(Row1Tag, Column1Tag, &Cell3Tag); //写文本
UF_TABNOT_set_cell_text(Cell0Tag, "设计者:");
UF_TABNOT_set_cell_text(Cell1Tag, "卢尚宇"); //合并最底下的单元格
UF_TABNOT_merge_cells(Cell2Tag, Cell3Tag); //获取合并单元格的行Tag
tag_t MergeRowTag = NULL_TAG;
UF_TABNOT_ask_nth_row(TabularNote, , &MergeRowTag); //获取合并单元格的列Tag
tag_t MergeColumnTag = NULL_TAG;
UF_TABNOT_ask_nth_column(TabularNote, , &MergeColumnTag); tag_t MergeCellTag = NULL_TAG;
UF_TABNOT_ask_cell_at_row_col(MergeRowTag, MergeColumnTag, &MergeCellTag); //写文本
UF_TABNOT_set_cell_text(MergeCellTag, "版本号:xxxxxxxxxx"); //检索默认单元格首选项
UF_TABNOT_cell_prefs_t cell_prefs;
UF_TABNOT_ask_default_cell_prefs(&cell_prefs); //设置单元格首选项
int fontIndex1 = workPart->Fonts()->AddFont("chinesef_fs", NXOpen::FontCollection::TypeNx);//更改字体
cell_prefs.text_font = fontIndex1; //字体
UF_TABNOT_set_cell_prefs(Cell0Tag, &cell_prefs);
UF_TABNOT_set_cell_prefs(Cell1Tag, &cell_prefs);
UF_TABNOT_set_cell_prefs(MergeCellTag, &cell_prefs); UF_terminate();
NX二次开发-UFUN工程图表格注释获取某一列的tag函数UF_TABNOT_ask_nth_column的更多相关文章
- NX二次开发-UFUN工程图表格注释获取某一行的tag函数UF_TABNOT_ask_nth_row
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- NX二次开发-UFUN工程图表格注释获取某一行某一列的tag函数UF_TABNOT_ask_cell_at_row_col
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- 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 ...
- NX二次开发-UFUN工程图表格注释写入文本内容UF_TABNOT_set_cell_text
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- NX二次开发-UFUN工程图表格注释检索默认单元格首选项UF_TABNOT_ask_default_cell_prefs
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- NX二次开发-UFUN工程图表格注释设置单元格首选项UF_TABNOT_set_cell_prefs
NX9+VS2012 #include <uf.h> #include <uf_tabnot.h> #include <NXOpen/Part.hxx> #incl ...
- NX二次开发-UFUN读取表格注释内容UF_TABNOT_ask_cell_text
NX11+VS2013 #include <uf.h> #include <uf_ui.h> #include <uf_tabnot.h> #include < ...
- NX二次开发-读取图纸表格注释与部件属性关联的名字
NX11+VS2013 #include <uf.h> #include <uf_ui.h> #include <uf_tabnot.h> #include < ...
- NX二次开发-UFUN工程图导入视图UF_DRAW_import_view
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_obj.h> #include <u ...
随机推荐
- 配置 Linux 静态网卡 & 远程连接 MySQL 问题
1.设置 Linux 为静态网络配置 使用 VMWare 安装好 CentOS 后,将网络适配器设置为 NAT 模式.为了防止 IP 关机重启时候经常变动,需要将网卡信息设置为静态. 修改 /etc/ ...
- Unity 调用jar闪退 解决方案
{ https://www.cnblogs.com/YZFHKMS-X/p/11864496.html }
- Delphi实现提取可执行文件内部所有图标
本实例实现的功能是能够从用户选择的可执行文件(后缀名为exe)中提取所有图标并且显示在窗体上. 在窗体中添加TImage 组件.TOpenDialog组件和TButton组件,TImage组件充当显示 ...
- NX二次开发-NXOpenC++ Example
NxOpenC++ Example NXOpen::WCS wcs坐标系 https://www.cnblogs.com/nxopen2018/p/11368763.html NXOpen::Draw ...
- centos 下安装 shpinx2.1.7 记录
安装sphinx yum install -y mysql mysql-devel yum install automake autoconf cd /usr/local/src/ wget http ...
- Spring Boot下启用https
1.需要一个证书,可以自己生成或者购买.下面是我们通过keytool自己生成. 打开运行,输入cmd,进入命令行 输入生成命令: keytool -genkey -alias tomcat -stor ...
- Django+telnetlib实现webtelnet
说明 基于 python3.7 + django 2.2.3 实现的 django-webtelnet.有兴趣的同学可以在此基础上稍作修改集成到自己的堡垒机中. 项目地址:https://github ...
- 3、加强siege性能测试
需求1:使用siege对多个页面进行加压 1.对如下3个页面加压 http://jrjf.hscx365.com/ http://jrjf.hscx365.com/solution/armyone.h ...
- 修改 firefox 默认缩放比例
- Error: EBUSY: resource busy or locked, symlink "xxx" 的解决方法
上面是报错信息. 解决方法:当我们在npm i 安装依赖的时候,会遇到这个Error: EBUSY: resource busy or locked, symlink....的问题.解决的 办法就是关 ...