NX9+VS2012

#include <uf.h>
#include <uf_ui.h>
#include <uf_ui_ont.h>
#include <uf_oper.h>
#include <uf_obj.h>


UF_initialize();

//获取当前加工导航器选中的对象数量和TAG
int count = 0;
tag_t* objects = NULL_TAG;
UF_UI_ONT_ask_selected_nodes(&count, &objects);

for (int i = 0; i < count; i++)
{

//is_edited         :1;  /* Has operation been edited ? */判断当前是否生成
//toolpath_exists   :1;  /* Does tool path exist ? */判断是否有刀具路径
//toolpath_edited   :1;  /* Has tool path been edited since//判断当前操作是否有被编辑过
//open              :29; * the last time it was posted ?判断刀具路径是否发布后处理

    //查询指定操作的状态
    UF_OPER_status_t status; 
    UF_OPER_ask_status(objects[i], &status);

    if (status.is_edited == false)
    {
        uc1601("提示:已生成!",1);
    }
    else
    {
        uc1601("提示:待生成!",1);
    }

}

//释放
UF_free(objects);

UF_terminate();

Caesar卢尚宇
2020年5月21日

NX CAM二次开发-UF_OPER_ask_status查询指定操作的状态_#include