/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ /* The code in the following example queries the drafting aid text data information. */ #include #include #include #include #include #include #include #include void ufusr(char *param, int *retcod, int param_len) { int ifail = 0; int num_text; tag_t draft_aid_tag = NULL_TAG; char error_message[133] = ""; UF_DRF_draft_aid_text_info_t *text_info; /* Initialize UG/Open API. */ ifail = UF_initialize(); /* Find the tag to a drafting entity. */ ifail = UF_OBJ_cycle_objs_in_part( UF_ASSEM_ask_work_part(), UF_drafting_entity_type, &draft_aid_tag ); if( !ifail && draft_aid_tag ) { /* Retrieve the text information of the drafting entity. */ ifail = UF_DRF_ask_draft_aid_text_info ( draft_aid_tag, &num_text, &text_info ); if( !ifail ) { /*Free the memory that contains the text information.*/ ifail = UF_DRF_free_text( num_text, &text_info ); } } printf( "UF_DRF_ask_draft_aid_text_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(); }