/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ /* The code in the following example queries the folded radius dimension information. */ #include #include #include #include #include #include #include void ufusr(char *param, int *retcod, int param_len) { int ifail = 0; int type, subtype; char error_message[133] = ""; tag_t folded_radius_dim_tag = NULL_TAG; UF_DRF_foldedradius_dim_info_t folded_radius_dim_info; /* Initialize User Function. */ 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, &folded_radius_dim_tag ); /* Find the tag of an ordinate dimension. */ while( !ifail && folded_radius_dim_tag ) { ifail = UF_OBJ_ask_type_and_subtype( folded_radius_dim_tag, &type, &subtype ); /* Retrieve the ordinate dimension origin information. */ if( !ifail && subtype == UF_dim_folded_radius_subtype ) { ifail = UF_DRF_ask_folded_radius_info( folded_radius_dim_tag, &folded_radius_dim_info ); } /* 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, &folded_radius_dim_tag ); } printf( "UF_DRF_ask_folded_radius_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(); }