/**
* 获取组件内的实体
* param instanceTag 判断传入的是68 还是63类型
* param bodys
* return
*/
int MODL::ASSEM_ask_instance_body(tag_t instanceTag, vector<tag_t>& bodys)
{
tag_t protoOBJ = 0;
int _type = 0, _subtype = 0;
UF_OBJ_ask_type_and_subtype(instanceTag, &_type, &_subtype);
if (_type == 63)
{
//protoOBJ =UF_ASSEM_ask_prototype_of_occ(instanceTag);
protoOBJ = instanceTag;
}
else if (_type == 68)
{
tag_t* occ_list = 0;
UCall(UF_ASSEM_ask_part_occs_of_inst(instanceTag, &occ_list));
//protoOBJ = UF_ASSEM_ask_prototype_of_occ(occ_list[0]);
protoOBJ = occ_list[0];
UF_free(occ_list);
}
tag_t member = 0;
UCall(UF_ASSEM_cycle_objs_in_comp(protoOBJ, &member));
while (member != NULL_TAG)
{
int type = 0, subType = 0;
UF_OBJ_ask_type_and_subtype(member, &type, &subType);
//获取其他类型 改这里
if (type == 70 && subType == 0)
{
bodys.push_back(member);
}
UF_ASSEM_cycle_objs_in_comp(protoOBJ, &member);
}
return 0;
}
08-18
1410
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-18
1311
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-18
2304
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交