NX二次开发-UFUN新建工程图UF_DRAW_create_drawing
作者:互联网
1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_draw.h> 5 #include <uf_part.h> 6 7 8 9 UF_initialize(); 10 11 //新建工程图(A4图纸) 12 char* DrawingName = "ABC";//设置图纸名字 13 UF_DRAW_info_t DrawingInfo;//设置图纸大小、投影视角、视图比例等 14 DrawingInfo.size_state = UF_DRAW_METRIC_SIZE;//设置图纸类型 15 DrawingInfo.size.metric_size_code = UF_DRAW_A4;//设置图纸大小 16 DrawingInfo.drawing_scale = 1.0;//设置比例 17 DrawingInfo.units = UF_PART_METRIC;//设置单位 18 DrawingInfo.projection_angle = UF_DRAW_FIRST_ANGLE_PROJECTION;//设置投影视角 19 tag_t DrawingTag = NULL_TAG; 20 UF_DRAW_create_drawing(DrawingName, &DrawingInfo, &DrawingTag); 21 22 //新建工程图(自定义大小) 23 char* DrawingName1 = "EDF";//设置图纸名字 24 UF_DRAW_info_t DrawingInfo1;//设置图纸大小、投影视角、视图比例等 25 DrawingInfo1.size_state = UF_DRAW_CUSTOM_SIZE;//设置图纸类型 26 DrawingInfo1.size.custom_size[0] = 300;//设置图纸高度 27 DrawingInfo1.size.custom_size[1] = 300;//设置图纸长度 28 DrawingInfo1.drawing_scale = 1.0;//设置比例 29 DrawingInfo1.units = UF_PART_METRIC;//设置单位 30 DrawingInfo1.projection_angle = UF_DRAW_FIRST_ANGLE_PROJECTION;//设置投影视角 31 tag_t DrawingTag1 = NULL_TAG; 32 UF_DRAW_create_drawing(DrawingName1, &DrawingInfo1, &DrawingTag1); 33 34 UF_terminate();
标签:图纸,DRAW,DrawingInfo1,UFUN,工程图,设置,二次开发,UF,size 来源: https://www.cnblogs.com/nxopen2018/p/10957650.html