NX二次开发-UFUN创建图纸竖直尺寸标注UF_DRF_create_vertical_dim
NX9+VS2012
#include <uf.h>
#include <uf_curve.h>
#include <uf_draw.h>
#include <uf_drf.h>
#include <uf_obj.h>
#include <uf_part.h>
#include <NXOpen/UI.hxx>
#include <NXOpen/MenuBar_MenuBarManager.hxx>
UF_initialize();
//创建点
double p1[3] = {10,0,0};
tag_t p1Tag = NULL_TAG;
UF_CURVE_create_point(p1,&p1Tag);
double p2[3] = {100,0,0};
tag_t p2Tag = NULL_TAG;
UF_CURVE_create_point(p2,&p2Tag);
double p3[3] = {0,100,0};
tag_t p3Tag = NULL_TAG;
UF_CURVE_create_point(p3,&p3Tag);
//创建直线
UF_CURVE_line_t Line_coords;
Line_coords.start_point[0] = p1[0];
Line_coords.start_point[1] = p1[1];
Line_coords.start_point[2] = p1[2];
Line_coords.end_point[0] = p2[0];
Line_coords.end_point[1] = p2[1];
Line_coords.end_point[2] = p2[2];
tag_t Line = NULL_TAG;
UF_CURVE_create_line(&Line_coords, &Line);
//创建直线
UF_CU