NX二次开发-UFUN批量操作图层状态UF_LAYER_set_many_layers_status

 1 NX11+VS2013
 2
 3 #include <uf.h>
 4 #include <uf_ui.h>
 5 #include <uf_layer.h>
 6
 7
 8 UF_initialize();
 9
10 //批量操作图层状态
11 UF_LAYER_status_info_t changes[UF_LAYER_MAX_LAYER];
12 int count = 10;//批量的数量
13 int num = 5;//批量的起始图层
14 for (int i = 0; i < count; i++)
15 {
16     changes[i].layer_number = num + i;
17     changes[i].layer_status = UF_LAYER_REFERENCE_LAYER;
18 }
19 UF_LAYER_set_many_layers_status(count, changes);
20
21 UF_terminate();
22
23 Caesar卢尚宇
24 2019年11月13日

原文地址:https://www.cnblogs.com/nxopen2018/p/11848033.html

时间: 2024-08-30 16:30:32

NX二次开发-UFUN批量操作图层状态UF_LAYER_set_many_layers_status的相关文章

NX二次开发-UFUN获取图层的状态UF_LAYER_ask_status

1 NX11+VS2013 2 3 #include <uf.h> 4 #include <uf_ui.h> 5 #include <uf_layer.h> 6 7 8 UF_initialize(); 9 10 //获取图层的状态 11 //1.UF_LAYER_WORK_LAYER 设置为工作图层 12 //2.UF_LAYER_ACTIVE_LAYER 设置图层可见可编辑 13 //3.UF_LAYER_REFERENCE_LAYER 设置图层仅可见 14 //4

NX二次开发-UFUN获取图层类别的信息UF_LAYER_ask_category_info

1 NX11+VS2013 2 3 #include <uf.h> 4 #include <uf_ui.h> 5 #include <uf_layer.h> 6 7 8 9 UF_initialize(); 10 11 //获取一个图层类别的tag 12 tag_t category = NULL_TAG; 13 UF_LAYER_ask_category_tag("01.Tangkl_Solids", &category); 14 15 /

NX二次开发-UFUN和NXOpen结合开发中Tag_t对象与TaggedObject对象转换方法

1 本文通过举四个例子来告诉大家在NX二次开发过程中会经常用到UFUN和NXOpen结合去开发,在UFUN中我们得到的是Tag_t对象,在NXOpen中得到的是TaggedObject对象,这两个是需要进行转换的.本文主要知识点为:TaggedObject->tag_t() , NXOpen::NXObjectManager::Get(BodyTag1) , feature1->JournalIdentifier()的用法. 2 3 NX11+VS2013 4 5 #include <u

NX二次开发-UFUN获取对象的显示属性(图层,颜色,空白状态,线宽,字体,高亮状态)UF_OBJ_ask_display_properties

1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_modl.h> 5 #include <uf_obj.h> 6 7 UF_initialize(); 8 9 UF_FEATURE_SIGN Sign = UF_NULLSIGN;//设置布尔 10 double Corner_pt[3] = {0.0, 0.0, 0.0};//设置原点 11 char *Edge_Len[3] = {"100", &qu

NX二次开发-UFUN设置除工作层之外的所有图层的状态UF_LAYER_set_all_but_work

1 NX11+VS2013 2 3 #include <uf.h> 4 #include <uf_ui.h> 5 #include <uf_layer.h> 6 7 8 UF_initialize(); 9 10 //设置除工作层之外的所有图层的状态. 11 UF_LAYER_set_all_but_work(UF_LAYER_ACTIVE_LAYER); 12 13 UF_terminate(); 14 15 16 Caesar卢尚宇 17 2019年11月13日 原

NX二次开发-UFUN获取一个图层类别的tag UF_LAYER_ask_category_tag

1 NX11+VS2013 2 3 #include <uf.h> 4 #include <uf_ui.h> 5 #include <uf_layer.h> 6 7 8 9 UF_initialize(); 10 11 //获取一个图层类别的tag 12 tag_t category = NULL_TAG; 13 UF_LAYER_ask_category_tag("01.Tangkl_Solids", &category); 14 15 /

NX二次开发-UFUN获取显示在NX交互界面的对象UF_OBJ_is_displayable

1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_disp.h> 5 #include <uf_obj.h> 6 #include <uf_part.h> 7 8 UF_initialize(); 9 10 //遍历当前显示部件 11 tag_t NextTag = NULL_TAG; 12 int Type1, SubType1; 13 do 14 { 15 NextTag = UF_OBJ_cycle_all

NX二次开发-UFUN读取工程图注释UF_DRF_ask_text_data

1 //NX9_NXOpenCPP_Wizard1 2 3 // Mandatory UF Includes 4 #include <uf.h> 5 #include <uf_object_types.h> 6 7 // Internal Includes 8 #include <NXOpen/ListingWindow.hxx> 9 #include <NXOpen/NXMessageBox.hxx> 10 #include <NXOpen/UI.h

NX二次开发-UFUN询问注释对象的数据UF_DRF_ask_ann_data

1 //NX9_NXOpenCPP_Wizard1 2 3 // Mandatory UF Includes 4 #include <uf.h> 5 #include <uf_object_types.h> 6 7 // Internal Includes 8 #include <NXOpen/ListingWindow.hxx> 9 #include <NXOpen/NXMessageBox.hxx> 10 #include <NXOpen/UI.h