NX二次开发 UFUN获得组数据 UF_GROUP_ask_group_data
//NX8.0+VS2010
#include <uf.h>
#include <uf_ui.h>
#include <uf_obj.h>
#include <uf_modl.h>
#include <uf_curve.h>
#include <uf_assem.h>
#include <uf_part.h>
#include <UF_GROUP.h>
//获得组里所有对象
bool AskGroupOjbects(const tag_t group_tag, std::vector<tag_t>& objects)
{
int i = 0, n_temp = 0;
tag_t* temps = NULL;
objects.clear();
if (NULL_TAG == group_tag
|| UF_GROUP_ask_group_data(group_tag, &temps, &n_temp))
{
return false;
}
for (i = 0; i < n_temp; i++)
{
objects.push_back(temps[i]);
}
UF_free(temps);
return true;
}