点击查看详细介绍

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

misnn 7年前 739 0

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


函数结构:
UF_DRF_ask_ordorigin_info
(
tag_t ordorigin_tag,
UF_DRF_orddisp_info_t * origin_disp,
int * num_assoc,
UF_DRF_assoc_info_t * assoc_objects
)

函数说明:
返回关联的对象,箭头,尺寸线的数据显示状态,原产地标志显示状态,以及用户提供的对象名称给指定的坐标原点标记。

函数参数:
第1个参数为输入:
ordorigin_tag代表参数变量,tag_t 为输入参数类型,纵坐标原点的标签

第2个参数为输出:
origin_disp代表参数变量,UF_DRF_orddisp_info_t * 为输出参数类型,坐标标注原产地显示信息(见UF_DRF_orddisp_info_t)

第3个参数为输出:
输出int * 整数型的参数,参数的变量格式为num_assoc,相关对象的数量

第4个参数为输出:
assoc_objects代表参数变量,UF_DRF_assoc_info_t * 为输出参数类型,相关对象的信息数组。该数组必须通过调用UF_free释放。

UF_DRF_ask_ordorigin_info函数实例代码演示:
在下面的示例中的代码查询坐标标注来源信息。
[quote]
#include <stdio.h>
#include <uf.h>
#include <uf_assem.h>
#include <uf_defs.h>
#include <uf_drf.h>
#include <uf_obj.h>
#include <uf_object_types.h>
#include <uf_part.h>
void ufusr(char *param, int *retcod, int param_len)
{
int ifail = 0;
int type, subtype;
char error_message[133] = "";
tag_t ordorigin_tag = NULL_TAG;
int ord_num_assoc;
UF_DRF_orddisp_info_t origin_disp;
UF_DRF_assoc_info_t ord_assoc_objs;
/* Initialize NX Open API. */
ifail = UF_initialize();
/* Find the tag to a dimension entity. */
ifail = UF_OBJ_cycle_objs_in_part( UF_ASSEM_ask_work_part(),
UF_dimension_type,
&ordorigin_tag );
/* Find the tag of an ordinate dimension. */
while( !ifail && ordorigin_tag )
{
ifail = UF_OBJ_ask_type_and_subtype( ordorigin_tag, &type,
&subtype );
/* Retrieve the ordinate dimension origin information. */
if( !ifail && subtype == UF_dim_ordinate_origin_subtype )
{
ifail = UF_DRF_ask_ordorigin_info ( ordorigin_tag,
&origin_disp,
&ord_num_assoc,
&ord_assoc_objs );
}
/* Find the next tag to a dimension entity. */
if ( !ifail )
ifail = UF_OBJ_cycle_objs_in_part(
UF_ASSEM_ask_work_part(),
UF_dimension_type,
&ordorigin_tag );
}
printf( "UF_DRF_ask_ordorigin_info 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)
请登录后发表新帖