NX9+VS2012 #include <uf.h> #include <uf_ui.h> #include <uf_ui_ont.h> UF_initialize(); //UF_UI_ONT_order = 0, /* program view */ //UF_UI_ONT_machine_mode, /* method view */ //UF_UI_ONT_geometry_mode, /* geometry view */ //UF_UI_ONT_machine_tool, /* tool view */ //获取当前加工导航器所在的视图 UF_UI_ONT_tree_mode_t view; UF_UI_ONT_ask_view(&view); if (view == UF_UI_ONT_order) { uc1601("当前在程序视图", 1); } else if(view == UF_UI_ONT_machine_mode) { uc1601("当前在加工方法视图", 1); } else if(view == UF_UI_ONT_geometry_mode) { uc1601("当前在几何视图", 1); } else if(view == UF_UI_ONT_machine_tool) { uc1601("当前在机床视图", 1); } UF_terminate(); Caesar卢尚宇 2020年5月2日