logo资料库

UG外部开发模式下创建Block.docx

第1页 / 共4页
第2页 / 共4页
第3页 / 共4页
第4页 / 共4页
资料共4页,全文预览结束
/***************************************************************************** ** ** NX9 Open Wizard1.cpp ** ** Description: ** Main file for the application. ** *****************************************************************************/ /* Include files */ #if ! defined ( __hp9000s800 ) && ! defined ( __sgi ) && ! defined ( __sun ) # include # include using std::ostrstream; using std::endl; using std::ends; using std::cerr; #else # include # include #endif #include #include #include
using namespace std; #define UF_CALL(X) (report_error( __FILE__, __LINE__, #X, (X))) 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); 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); } return(irc);
/* Main routine */ extern void main( char argc, char *argv[] ) { /* Initialize the API environment */ if( UF_CALL(UF_initialize()) ) { } /* Failed to initialize */ return; /* TODO: Add your application code here */ cout<<"welcome to plmhome, we are learning NX Open API"<Create the part without errors"<Create the blcok without errors"<Save the blcok without errors"<Close the part without errors"<
/* Terminate the API environment */ UF_CALL(UF_terminate()); } /***************************************************************************** ** Utilities *****************************************************************************/
分享到:
收藏