首页 > 其他 > 详细

UFUN函数 UF_ATTR函数(UF_ATTR_read_value 函数用法)

时间:2019-12-14 13:16:32      阅读:81      评论:0      收藏:0      [点我收藏+]
 1 //此函数的功能是输入tag值,返回与属性标题对应的属性值
 2 static string read_attr(tag_t object_tag)
 3 {
 4     UF_initialize();
 5 
 6     char title[UF_ATTR_MAX_TITLE_LEN + 1]="零件名称";
 7     int type= UF_ATTR_any;
 8     UF_ATTR_value_t value;
 9     //读属性值
10     UF_ATTR_read_value(object_tag,title,type,&value);
11     string s1=value.value.string;
12     return s1;
13 
14     UF_terminate();
15 }
16 extern DllExport void ufsta( char *param, int *returnCode, int rlen )
17 {
18     /* Initialize the API environment */
19     if( UF_CALL(UF_initialize()) ) 
20     {
21         /* Failed to initialize */
22         return;
23     }
24     
25     /* TODO: Add your application code here */
26 
27     tag_t object_tag=609790;
28     string s2=read_attr(object_tag);
29     //打印
30     UF_UI_open_listing_window();
31     UF_UI_write_listing_window(s2.c_str());
32 
33     /* Terminate the API environment */
34     UF_CALL(UF_terminate());
35 }

技术分享图片

UFUN函数 UF_ATTR函数(UF_ATTR_read_value 函数用法)

原文:https://www.cnblogs.com/zzyfym/p/12038641.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!