// 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();
if ( 0 == errorCode )
{
/* TODO: Add your application code here */
do_ugopen_api();
/* Terminate the API environment */
errorCode = UF_terminate();
}
/* Print out any error messages */
 rintErrorMessage( errorCode );
}
// 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 );
/* 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();
}
}
我就纳闷为什么可以知道点的tag值,可怎么看不到点呢?作者: 深夜摔键盘 时间: 2005-7-19 11:23
smart point本来就是不可见的吧。它仅是一个UG对象,比如两条直线的交点,就是一个smart point,它是不可见的,但在点构造器选择交点捕捉时系统能访问到这个点。