|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
偶得代码:
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 */
UF_PART_load_status_t error_status;
char part_name[133] = "G:\\design\\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{
uc1601("成功创建Part",1);
}
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)]
}
/* Print out any error messages */
 rintErrorMessage( errorCode );
}
part是成功创建的,不过线看不到,有什么地方不对吗? |
|