/*****************************************************************************
**
** 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
*****************************************************************************/