点击查看详细介绍

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

misnn 7年前 548 0

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


函数结构:
UF_DRAW_ask_view_anchor
(
const tag_t view_tag,
tag_t * anchor_point
)

函数说明:
检索视图的锚点。

函数参数:
第1个参数为输入:
view_tag代表参数变量,const tag_t 为输入参数类型,看标签,其模型的参考点是要得到。

第2个参数为输出:
anchor_point代表参数变量,tag_t * 为输出参数类型,指针指向的标记表示视图参考点。

UF_DRAW_ask_view_anchor函数实例代码演示:
描述此功能是展示一个小样本程序UF_DRAW_ask_view_anchor的调用()。它被放置我们直接文档UFUN在开始的包括语句。
[quote]
#include <stdlib.h>
#include <stdio.h>
#include <uf.h>
#include <uf_defs.h>
#include <uf_draw.h>
#include <uf_obj.h>
#include <uf_part.h>
#include <uf_view.h>

void ufusr(char *param, int *retcod, int param_len)
{
int ifail = 0;
tag_t point_tag = NULL_TAG;
tag_t view_tag = NULL_TAG;
tag_t part_tag = NULL_TAG;
char *view_name = "TOP@1";
char error_message[133];

ifail = UF_initialize();

if( !ifail )
part_tag = UF_PART_ask_display_part();

if( !ifail && part_tag != NULL_TAG )
/*get view tag of TOP@1 view */
ifail = UF_VIEW_ask_tag_of_view_name( view_name,
&view_tag );

if( !ifail && part_tag != NULL_TAG &&
view_tag != NULL_TAG )
ifail = UF_DRAW_ask_view_anchor( view_tag,
&point_tag );

printf( "UF_DRAW_ask_view_anchor " );
if( ifail )
{
ifail = UF_get_fail_message( ifail, error_message );
printf( "fails. \nError is:%s\n", error_message );
}
else if( part_tag == NULL_TAG )
printf( "fails.\nError is: no active part.\n" );
else if ( view_tag == NULL_TAG )
printf( "fails.\nError is: view not found.\n" );
else
printf( "is successful.\n" );

ifail = UF_terminate();
}



[/quote]

0

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