NX9+VS2012 #include <uf.h> #include <uf_ui.h> #include <uf_ui_ont.h> #include <uf_param.h> #include <uf_param_indices.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++) { tag_t operTag = objects[i]; //设置转数 UF_PARAM_set_double_value(operTag, UF_PARAM_SPINDLE_RPM, 2300); //设置进给率 UF_PARAM_feedrate_t feed_value; UF_PARAM_ask_subobj_ptr_value(operTag,UF_PARAM_FEED_CUT,&feed_value); feed_value.value=2500; UF_PARAM_set_subobj_ptr_value(operTag, UF_PARAM_FEED_CUT,&feed_value); } //释放 UF_free(objects); UF_terminate(); Caesar卢尚宇 2020年5月30日