NX二次开发-UFUN更新图纸所有视图UF_DRAW_upd_out_of_date_views
NX9+VS2012
#include <uf.h>
#include <uf_draw.h>
#include <uf_obj.h>
#include <uf_part.h>
#include <NXOpen/UI.hxx>
#include <NXOpen/MenuBar_MenuBarManager.hxx>
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);
//导入视图(创建Trimetric视图)
//找名字获取视图的Tag
t