uf创建图纸
#include <uf_draw.h>
//创建图纸
int ifail = 0;
tag_t drawing_tag, new_drawing_tag;
char drawing_name[30] ="SHT1"; //图纸名称
UF_DRAW_info_t drawing_info;
drawing_info.size_state = UF_DRAW_CUSTOM_SIZE; //图纸尺寸自定义
UF_DRAW_size_union_u drawunion;
drawunion.custom_size[0]=210; //图纸高
drawunion.custom_size[1]=297; //图纸长
drawing_info.size = drawunion;
drawing_info.drawing_scale = 1; // 图纸视图比例
drawing_info.units = 1; //单位 1=UF_PART_METRIC=毫米;2=UF_PART_ENGLISH=英寸
drawing_info.projection_angle =UF_DRAW_FIRST_ANGLE_PROJECTION; //视角投影
//UF_DRAW_FIRST_ANGLE_PROJECTION 第1象限角投影
//UF_DRAW_THIRD_ANGLE_PROJECTION 第3象限角投影
/* 创建图纸 */
UF_DRAW_create_drawing( drawing_name, &drawing_info, &new_drawing_tag);
/* 打开图纸 */
UF_DRAW_open_drawing( new_drawing_tag );
_____________________________________________________________________________ _
中磊UG二次开发教程 梅雷著 qq1821117007
学UG就上UG网 http://www.9sug.com/
|