点击查看详细介绍

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

misnn 9年前 875 0

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


函数结构:
UF_DRAW_ask_view_angle
(
tag_t view_tag,
double * angle_value
)

函数说明:
返回度视角。

函数参数:
第1个参数为输入:
view_tag代表参数变量,tag_t 为输入参数类型,查看标记

第2个参数为输出:
输出double * 双精度类型的参数,参数的变量格式为angle_value,度的视图的角度

UF_DRAW_ask_view_angle函数实例代码演示:
在下面的例子中的代码是一个旋转角绘图员视图。
[quote]
#include <stdio.h>
#include <uf.h>
#include <uf_defs.h>
#include <uf_draw.h>
#include <uf_draw_types.h>
#include <uf_obj.h>
#include <uf_view.h>
void ufusr(char *param, int *retcod, int param_len)
{
char drawing_name [MAX_ENTITY_NAME_SIZE] = "";
char view_name [MAX_ENTITY_NAME_SIZE] = "";
char error_message[MAX_LINE_SIZE + 1] = "";
tag_t view_tag = NULL_TAG;
tag_t drawing_tag = NULL_TAG;
double angle;
int ifail = 0;
ifail = UF_initialize();
if (!ifail)
{
/* Get the tag of drawing. */
ifail = UF_DRAW_ask_current_drawing(&drawing_tag);
}
if (!ifail)
{
/* Get the name of first drawing. */
ifail = UF_OBJ_ask_name(drawing_tag, drawing_name);
}
if (!ifail)
{
/* Get the name of the drawing's first view. */
ifail = uc6499 (drawing_name, view_name);
}
if (!ifail)
{
/* Get the view's tag. */
ifail = UF_VIEW_ask_tag_of_view_name (view_name, &view_tag);
}
if (!ifail)
{
/* Get the view angle in degrees. */
ifail = UF_DRAW_ask_view_angle (view_tag, &angle);
}
printf ("UF_DRAW_ask_view_angle sample ");
if (ifail)
{
ifail = UF_get_fail_message( ifail, error_message );
printf( "fails.\nError is: %s\n", error_message );
}
else
{
printf( "is successful.\n" );
printf( "The angle value is %g \n", angle );
}
UF_terminate();
}


[/quote]

0

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