点击查看详细介绍

UF_DRAW_set_auto_update() 函数的参数解释说明、函数详细用法,以及实例代码演示

misnn 8年前 530 0

购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008  QQ号:85585969  


函数结构:
UF_DRAW_set_auto_update
(
tag_t view_tag,
logical * auto_update
)

函数说明:
该功能设置自动更新的当前值 偏爱。

函数参数:
第1个参数为输入:
view_tag代表参数变量,tag_t 为输入参数类型,视图对象的标签

第2个参数为输出:
auto_update代表参数变量,logical * 为输出参数类型,TRUE=自动更新视图FALSE =不自动更新视图

UF_DRAW_set_auto_update函数实例代码演示:
在下面的示例代码设置了自动更新视图显示值。
[quote]
#include <stdio.h>
#include <uf.h>
#include <uf_draw.h>
#include <uf_draw_types.h
#include <uf_obj.h>
#include <view.h>
void ufusr(char *param, int *retcod, int param_len)
{
char drawing_name [30] = "";
char view_name [30] = "";
char error_message[133] = "";
tag_t view_tag = NULL_TAG;
int ifail = 0;
logical auto_update;
ifail = UF_initialize();
if (!ifail)
{
/* Retrieve the name of the first drawing. */
ifail = uc6492 (drawing_name);
}
if (!ifail)
{
/* get the drawing's first view name */
ifail = uc6499 (drawing_name, view_name);
}
if (!ifail)
{
/* Get the tag of the view. */
ifail = UF_VIEW_ask_tag_of_view_name (view_name,
&view_tag);
}
/* Set the view's auto update flag to true. */
if (!ifail)
{
auto_update = true;
ifail = UF_DRAW_set_auto_update (view_tag,&auto_update);
}
printf ("UF_DRAW_set_auto_update sample ");
if (ifail)
{
ifail = UF_get_fail_message( ifail, error_message );
printf( "fails.\nError is: %s\n", error_message );
}
else
printf( "is successful.\n" );
UF_terminate();
}




[/quote]

0

最新回复 (0)
请登录后发表新帖