even2004 信息:
来自:未填
发贴:1239 贴
积分:244 点
货币:5814 阳光币
注册时间:2008/12/31
资料 好友 消息 引用 回复 选择字号 9 10 11 12 14 15 16 18 20 25 30 50
[二次开发] edit sphere parameter(use UF_MODL_edit 此帖于 2009/09/21/08:14 被 even2004 编辑 #include <stdio.h> #include <string.h> #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> #include <uf_object_types.h> #define UF_CALL(X) (report_error( __FILE__, __LINE__, #X, (X))) /*ARGSUSED*/ static int report_error( char *file, int line, char *call, int irc) { if (irc) { char err[133], msg[133]; sprintf(msg, "*** ERROR code %d at line %d in %s:n+++ ", irc, line, file); UF_get_fail_message(irc, err); /* NOTE: UF_print_syslog is new in V18 */ UF_print_syslog(msg, FALSE); UF_print_syslog(err, FALSE); UF_print_syslog("n", FALSE); UF_print_syslog(call, FALSE); UF_print_syslog(";n", FALSE); if (!UF_UI_open_listing_window()) { UF_UI_write_listing_window(msg); UF_UI_write_listing_window(err); UF_UI_write_listing_window("n"); UF_UI_write_listing_window(call); UF_UI_write_listing_window(";n"); } } return(irc); } #define WRITE(X) UF_UI_open_listing_window(); UF_UI_write_listing_window(X) /*ARGSUSED*/ static tag_t select_a_feature(char *prompt) { int cnt, resp;: tag_t first, *feats; $ UF_CALL(UF_UI_select_feature(prompt, NULL, &cnt, &feats, &resp)); if (cnt)' {1 O. first = feats[0];) UF_free(feats); return (first); } else return (NULL_TAG); } /*ARGSUSED*/ static logical prompt_for_a_number(char *prompt, char *item, double *number) {. int irc, resp; char menu[1][16]; double da[1]; strncpy(&menu[0][0], item, 16); menu[0][15] = '