/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ #include #include #include #define CHECK( func_ ) \ ifail = (func_); \ if ( ifail != 0 ) {\ printf("ERROR: %s returned %d", # func_, ifail ); \ return ifail; } #define CREATION_DATE 1 #define MODIFICATION_DATE 2 int main(int argc, char *argv[]) { int ifail = 0; char part_name[MAX_UGMGR_NAME_LEN+1]; int output_code; char* date; ifail = UF_UGMGR_initialize(argc,(const char**)argv); if (ifail != 0) { printf("ERROR: Failed to initialize with error code %d", ifail); exit(1); } printf( "Enter a part name:" ); scanf( "%s", part_name ); UF_UGMGR_invoke_pdm_server( CREATION_DATE, part_name, &output_code, &date ); printf( "\nAfter calling UF_UGMGR_invoke_pdm_server()\n" ); printf( "Part : %s\n", part_name ); printf( "creation date : %s\n", date ); printf( "output_code : %d\n\n", output_code ); UF_UGMGR_invoke_pdm_server( MODIFICATION_DATE, part_name, &output_code, &date ); printf( "\nAfter calling UF_UGMGR_invoke_pdm_server()\n" ); printf( "Part : %s\n", part_name ); printf( "modificn date : %s\n", date ); printf( "output_code : %d\n\n", output_code ); UF_UGMGR_terminate(); return 0; }