poncho_wang wrote:
偶得代码:
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();
}
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)]
}
/* Terminate the API environment */
errorCode = UF_terminate();
return;
}
/* Print out any error messages */
PrintErrorMessage( errorCode );
}
poncho_wang wrote:
可是。。。编译是没有问题的阿
poncho_wang wrote:
好像是的哦,谢谢大家
唉,偶在UG方面真是一个白痴~~~~阿
欢迎光临 iCAx开思工具箱 (https://t.icax.org/) | Powered by Discuz! X3.3 |