/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ /* This example shows using the class selection dialog with all standard object types selectable. To set different object types selectable, see the example for UF_UI_select_with_single_dialog. */ #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 cue[] = "Select Objects"; char title[] = "User Title"; int response, count, i; tag_p_t objects; /* Use multiple class selection with scope set to any object in the work part and without using an initialization procedure. */ if((UF_CALL(UF_UI_select_with_class_dialog( cue, title, UF_UI_SEL_SCOPE_WORK_PART, NULL, NULL, &response, &count, &objects))) == 0) { printf("object count = %d\n",count); if (response == UF_UI_OK && count > 0) { for (i=0; i