NX二次开发 临时对象 UFUN清除临时对象 UF_DISP_refresh
//NX8.0+VS2010
#include <UF_DISP.h>
#include <UF_OBJ.h>
extern DllExport void ufsta(char* param, int* returnCode, int rlen)
{
if (UF_initialize())
return;
//设置临时对象显示状态
UF_DISP_poly_marker_t markerType = UF_DISP_POINT;//点类型
UF_DISP_text_ref_t ref_point = UF_DISP_TOPLEFT;
UF_OBJ_disp_props_t disp;
disp.layer = 201;
disp.color = 186;
disp.blank_status = UF_OBJ_NOT_BLANKED;
disp.line_width = UF_OBJ_WIDTH_NORMAL;
disp.font = 0;
disp.highlight_status = false;
//创建临时点
double point[3] = { 20.0, 10.0, 0.0 };
UF_DISP_display_temporary_point(NULL, UF_DISP_USE_WORK_VIEW, point, &disp, markerType);
uc1601("111", 1);
UF_DISP_refresh();//清除临时对象
UF_terminate();
}