/* * The code in the following example sets the automatic update view * display value. */ #include #include #include #include #include void ufusr(char *param, int *retcod, int param_len) { char drawing_name [30] = ""; char view_name [30] = ""; char error_message[133] = ""; tag_t view_tag = NULL_TAG; int ifail = 0; logical auto_update; ifail = UF_initialize(); if (!ifail) { /* Retrieve the name of the first drawing. */ ifail = uc6492 (drawing_name); } if (!ifail) { /* get the drawing's first view name */ ifail = uc6499 (drawing_name, view_name); } if (!ifail) { /* Get the tag of the view. */ ifail = UF_VIEW_ask_tag_of_view_name (view_name, &view_tag); } /* Set the view's auto update flag to true. */ if (!ifail) { auto_update = true; ifail = UF_DRAW_set_auto_update (view_tag,&auto_update); } printf ("UF_DRAW_set_auto_update 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(); }