NX9+VS2012
#include <uf.h>
#include <uf_setup.h>
#include <uf_ncgroup.h>
#include <uf_ui_ont.h>
#include <uf_obj.h>
#include <uf_ui.h>
UF_initialize();
//获取加工设置
tag_t setup_tag = NULL_TAG;
UF_SETUP_ask_setup(&setup_tag);
if (setup_tag == NULL_TAG)
{
uc1601("提示:请先初始化加工环境", 1);
return;
}
//创建程序组
tag_t new_object = NULL_TAG;
UF_NCPROG_create("mill_planar", "PROGRAM", &new_object);
//获得加工几何视图的根节点
tag_t program_group = NULL_TAG;
UF_SETUP_ask_program_root(setup_tag, &program_group);
//往程序组里添加成员
UF_NCGROUP_accept_member(program_group, new_object);
//设置名字
UF_OBJ_set_name(new_object, "LSY");
//刷新当前操作导视器
UF_UI_ONT_refresh();
UF_terminate();
Caesar卢尚宇
2020年5月3日
