给你改了一下,重新贴上,试试吧
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 */
char part_name[133] = "D:test.prt";
int units = 1;
tag_t part;
UF_PART_new(part_name,units,[$part)]
if(part == NULL_TAG)
{
uc1601("创建Part错误",1);
UF_PART_close_all();
/* Terminate the API environment */
errorCode = UF_terminate();
return;
}
else
{
UF_CURVE_line_t sline1;
tag_t line1;
sline1.start_point[0] = 0.0;
sline1.start_point[1] = 0.0;
sline1.start_point[2] = 0.0;
sline1.end_point[0] = 0.0;
sline1.end_point[1] = 5.0;
sline1.end_point[2] = 6.0;
UF_CURVE_create_line([$sline1,&line1)]
uc1601("成功创建Part",1);
}
}
/* Print out any error messages */
} |