iCAx开思工具箱
标题:
求教UF_ASSEM_add_part_to_assembly的用法
[打印本页]
作者:
miraculous
时间:
2005-4-22 11:00
标题:
求教UF_ASSEM_add_part_to_assembly的用法
建立一个空的prt文件后,想执行以下代码实现matrix.prt文件的载入:
tag_t ParentPart;
tag_t InstTag;
char PartName[] = "F:\\UG\\work\\matrix.prt";
char RefsetName[] = "MODEL";
char InstanceName[] = "MATRIX_new";
double Origin[3] = {0.0,0.0,0.0};
double CsysMatrix[6] = {1.0,0.0,0.0, 0.0,1.0,0.0};
int layer = 1;
UF_PART_load_status_t ErrorStatus;
tag_t DisplayPart = UF_PART_ask_display_part();
 
arentPart = UF_ASSEM_ask_root_part_occ(DisplayPart);
int Irc = UF_ASSEM_add_part_to_assembly(ParentPart,PartName,RefsetName,
InstanceName,Origin,CsysMatrix,layer,[$InstTag,&ErrorStatus)]
这里面的ParentPart的tag值该如何赋予?
另外请问各位高手,其它参数这样使用有没有问题?
谢谢!
作者:
miraculous
时间:
2005-4-23 14:59
问题解决了
在空文件的情况下直接用DisplayPart作为ParentPart的Tag值就能够载入了
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3