1 #include <uf.h> 2 #include <uf_drf.h> 3 #include <uf_obj.h> 4 #include <uf_part.h> 5 #include <uf_ui.h> 6 7 8 UF_initialize(); 9 10 //遍历所有尺寸 11 int type = 0; 12 tag_t DimTag = NULL_TAG; 13 UF_OBJ_cycle_objs_in_part1(UF_PART_ask_display_part(), UF_dimension_type, &DimTag);//遍历所有尺寸 14 while (DimTag != NULL_TAG) 15 { 16 //设置尺寸的附加尺寸 17 int num_text = 1; 18 UF_DRF_appended_text_t appended_text; 19 appended_text.location = UF_DRF_APPENDED_TEXT_BEFORE; 20 appended_text.num_lines =2; 21 char* msg[] = { "123", "ABC" }; 22 appended_text.text = msg; 23 UF_DRF_set_appended_text(DimTag, num_text, &appended_text); 24 25 UF_OBJ_cycle_objs_in_part1(UF_PART_ask_display_part(), UF_dimension_type, &DimTag); 26 } 27 28 29 30 UF_terminate(); 31 32 Caesar卢尚宇 33 2019年7月4日