/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ #include #include #include #include #define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X))) static int report( char *file, int line, char *call, int irc) { if (irc) { char messg[133]; printf("%s, line %d: %s\n", file, line, call); (UF_get_fail_message(irc, messg)) ? printf(" returned a %d\n", irc) : printf(" returned error %d: %s\n", irc, messg); } return(irc); } static void do_ugopen_api(void) { char *block_len[3] = {"1","2","3"}; char *string; char buf[100]; double block_orig[3] = {0.0,0.0,0.0}; tag_t blk_obj; tag_t *exps; int number_of_exps=0,i; UF_UI_open_listing_window(); /* Create a block we can query */ UF_CALL(UF_MODL_create_block1(UF_NULLSIGN, block_orig, block_len, &blk_obj)); if(!UF_CALL(UF_MODL_ask_exps_of_feature(blk_obj, &number_of_exps, &exps))) { sprintf(buf,"number_of_exps=%d\n",number_of_exps); UF_UI_write_listing_window(buf); UF_UI_write_listing_window("Asking expression strings\n"); for(i=0;i