//此函数的功能是打印当前坐标系试图的所有坐标系名称
static void geom_list_name(tag_t group_tag)
{
//ask_member_list
int count=0;
tag_t *list=NULL;
//ask_name
char name[UF_OBJ_NAME_LEN+1];
//ask_type_and_subtype
int type=0;
int subtype=0;
UF_NCGROUP_ask_member_list(group_tag,&count,&list);
UF_UI_open_listing_window();
for (int i=0;i<count;i++)
{
UF_OBJ_ask_type_and_subtype(list[i],&type,&subtype);
if (type==UF_machining_geometry_grp_type && subtype==UF_mill_orient_subtype)
{
UF_OBJ_ask_name(list[i],name);
strcat_s(name,"\n");
UF_UI_write_listing_window(name);
UF_UI_write_listing_window("\n");
}
}
}
//此函数的功能是打印当前程序试图的所有程序组名称
static void programmer_list_name(tag_t group_tag)
{
//ask_member_list
int count=0;
tag_t *list=NULL;
//ask_name
char name[UF_OBJ_NAME_LEN+1];
//ask_type_and_subtype
int type=0;
int subtype=0;
UF_NCGROUP_ask_member_list(group_tag,&count,&list);
UF_UI_open_listing_window();
for (int i=0;i<count;i++)
{
UF_OBJ_ask_type_and_subtype(list[i],&type,&subtype);
if (type==UF_machining_task_type && subtype==UF_mach_order_task_subtype)
{
UF_OBJ_ask_name(list[i],name);
strcat_s(name,"\n");
UF_UI_write_listing_window(name);
UF_UI_write_listing_window("\n");
}
}
}
//此函数的功能是打印当前刀具试图的所有刀具名称
static void machine_list_name(tag_t group_tag)
{
//ask_member_list
int count=0;
tag_t *list=NULL;
//ask_name
char name[UF_OBJ_NAME_LEN+1];
//ask_type_and_subtype
int type=0;
int subtype=0;
UF_NCGROUP_ask_member_list(group_tag,&count,&list);
UF_UI_open_listing_window();
for (int i=0;i<count;i++)
{
UF_OBJ_ask_type_and_subtype(list[i],&type,&subtype);
if (type==UF_machining_tool_type && subtype==UF_mach_tool_subtype)
{
UF_OBJ_ask_name(list[i],name);
strcat_s(name,"\n");
UF_UI_write_listing_window(name);
UF_UI_write_listing_window("\n");
}
}
}
//此函数的功能是打印当前方法试图的所有工艺名称
static void method_list_name(tag_t group_tag)
{
//ask_member_list
int count=0;
tag_t *list=NULL;
//ask_name
char name[UF_OBJ_NAME_LEN+1];
//ask_type_and_subtype
int type=0;
int subtype=0;
UF_NCGROUP_ask_member_list(group_tag,&count,&list);
UF_UI_open_listing_window();
for (int i=0;i<count;i++)
{
UF_OBJ_ask_type_and_subtype(list[i],&type,&subtype);
if (type==UF_machining_mthd_type && subtype==UF_mach_mill_mthd_subtype)
{
UF_OBJ_ask_name(list[i],name);
strcat_s(name,"\n");
UF_UI_write_listing_window(name);
UF_UI_write_listing_window("\n");
}
}
}
extern DllExport void ufsta( char *param, int *returnCode, int rlen )
{
/* Initialize the API environment */
if( UF_CALL(UF_initialize()) )
{
/* Failed to initialize */
return;
} /* TODO: Add your application code here */
UF_initialize();
//根
tag_t setup_tag=NULL_TAG;
tag_t geom_group=NULL_TAG;
tag_t mct_group=NULL_TAG;
tag_t mthd_group=NULL_TAG;
tag_t program_group=NULL_TAG;
UF_SETUP_ask_setup (&setup_tag);
//几何试图
UF_SETUP_ask_geom_root (setup_tag,&geom_group);
//机床试图
UF_SETUP_ask_mct_root (setup_tag,&mct_group);
//方法试图
UF_SETUP_ask_mthd_root (setup_tag,&mthd_group);
//程序试图
UF_SETUP_ask_program_root (setup_tag,&program_group);
//打印
geom_list_name(geom_group);
programmer_list_name(program_group);
machine_list_name(mct_group);
method_list_name(mthd_group); UF_terminate();
/* Terminate the API environment */
UF_CALL(UF_terminate());
}

本文转自https://www.cnblogs.com/zzyfym/p/12108176.html

最新文章

  1. 创建线程方式-GCD
  2. iOS开发过程中,触控板的使用技巧
  3. java互斥方法
  4. c 深度剖析 3
  5. MongoDB:Replica Set 之操作日志 Oplog
  6. 关于打包android自己编写的第三方library提供jar
  7. [AngularJS] Consistency between ui-router states and Angular directives
  8. Amazon S3数据一致性模型
  9. (转)生产者/消费者问题的多种Java实现方式 (待整理)
  10. leetcode——262. Trips and Users
  11. postman模拟HttpPost请求的方法
  12. Python——SQLite
  13. Java学习笔记一:数据类型I
  14. CentOS 7 镜像下载
  15. Artech的MVC4框架学习——第八章View的呈现
  16. 移动端H5适配方法(盒子+图片+文字)
  17. [转]JavaScript RegExp 对象参考手册
  18. 快速过滤出完整的SQL语句
  19. Python数据模型建立
  20. json_decode($json, true) true什么意思

热门文章

  1. C# 前台线程 后台线程区别
  2. float高度塌陷和BFC
  3. webpack 5 配置babel-loader babel7
  4. 如何在eclipse里的动态Web项目建立后缀为xml的文件
  5. uni-app学习笔记之----getCurrentPages()的使用
  6. pr 如何给视频进行加速,慢速处理
  7. (原创)odoo14下qweb模板的前端与后端语法区别
  8. (0514)芯王国-志锐-Sd卡高速控制-AXI验证
  9. Java Maven环境搭建
  10. Linux装cudnn