/* The code in the following example modifies the rotation angle of a drawing member view. */ #include #include #include #include #include #include #include #include void ufusr(char *param, int *retcod, int param_len) { char drawing_name [MAX_ENTITY_NAME_SIZE] = ""; char view_name [MAX_ENTITY_NAME_SIZE] = ""; char error_message[MAX_LINE_SIZE + 1] = ""; tag_t view_tag = NULL_TAG; tag_t drawing_tag = NULL_TAG; int ifail = 0; ifail = UF_initialize(); if (!ifail) { /* Get the tag of drawing. */ ifail = UF_DRAW_ask_current_drawing (&drawing_tag); if (!ifail) { /* Get the name of first drawing. */ ifail = UF_OBJ_ask_name(drawing_tag, drawing_name); } if (!ifail) { /* Get the name of the drawing's first view. */ ifail = uc6499 (drawing_name, view_name); } if (!ifail) { /* Get the view's tag. */ ifail = UF_VIEW_ask_tag_of_view_name (view_name, &view_tag); } if (!ifail) { /* Set the view angle. */ ifail = UF_DRAW_set_view_angle (view_tag, 45.0); } printf ("UF_DRAW_set_view_angle 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(); }