// Unigraphics Startup
// This entry point activates the application at Unigraphics startup
extern "C" DllExport void ufsta( char *param, int *returnCode, int rlen )
{
/* Initialize the API environment */
int errorCode = UF_initialize();
int RetCode = 0;
FILE *fp;
AllocConsole();
// reopen stdout on conout$ for fprintf and printf
fp = freopen("conout$", "w", stdout);
fprintf( stdout, "%s\n", "Begin of program" );
// Unload Handler
// This function specifies when to unload your application from Unigraphics.
// If your application registers a callback (from a MenuScript item or a
// User Defined Object for example), this function MUST return
// "UF_UNLOAD_UG_TERMINATE".
extern "C" int ufusr_ask_unload( void )
{
return( UF_UNLOAD_UG_TERMINATE );
}
/* PrintErrorMessage
**
** Prints error messages to standard error and the Unigraphics status
** line. */
static void PrintErrorMessage( int errorCode )
{
if ( 0 != errorCode )
{
/* Retrieve the associated error message */
char message[133];
UF_get_fail_message( errorCode, message );
printf( message );
/* Print out the message */
UF_UI_set_status( message );
// Construct a buffer to hold the text.
ostrstream error_message;
// Initialize the buffer with the required text.
error_message << endl
<< "Error:" << endl
<< message
<< endl << endl << ends;
// Write the message to standard error
cerr << error_message.str();
}
}作者: spline 时间: 2003-6-13 16:57
错误码:580009
内容:A dimension subscript for an array attribute was out of range or invalid作者: spline 时间: 2003-6-15 11:06
绝望了作者: spline 时间: 2003-6-15 11:23
zzz有什么高招?作者: zzz 时间: 2003-6-15 12:28
UG的smbend是有问题。作者: spline 时间: 2003-6-16 12:21
如何在能解决这个问题呢?以我们的能力可以吗?
EDS会有什么好的解决办法吗?
如果不行,那我就彻底绝望了!