NX二次开发-UFUN重命名工程图UF_DRAW_rename_drawing

NX9+VS2012

#include <uf.h>
#include <uf_draw.h>
#include <uf_part.h>



UF_initialize();

//新建工程图(A4图纸)
char* DrawingName = "ABC";//设置图纸名字
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);

//新建工程图(自定义大小)
char* DrawingName1 = "EDF";//设置图纸名字
UF_DRAW_info_t DrawingInfo1;//设置图纸大小、投影视角、视图比例等
DrawingInfo1.size_state = UF_DRAW_CUSTOM_SIZE;//设置图纸类型
DrawingInfo1.size.custom_size[0] = 300;//设置图纸高度
DrawingInfo1.size.custom_size[1] = 300;//设置图纸长度
DrawingInfo1.drawing_scale = 1.0;//设置比例
DrawingInfo1.units = UF_PART_METRIC;//设置单位
DrawingInfo1.projection_angle = UF_DRAW_FIRST_ANGLE_PROJECTION;//设置投影视角
tag_t DrawingTag1 = NULL_TAG;
UF_DRAW_create_drawing(DrawingName1, &DrawingInfo1, &DrawingTag1);

//打开工程图
UF_DRAW_open_drawing(DrawingTag1);

//重命名工程图
UF_DRAW_rename_drawing(DrawingTag1, "LSY");

UF_terminate();

NX二次开发-UFUN重命名工程图UF_DRAW_rename_drawing

上一篇:NX二次开发-直线分析函数UF_EVAL_ask_line与NXOpen::Line直线分析的用法


下一篇:NX二次开发-UFUN获取工程图详细信息UF_DRAW_ask_drawing_info