文章作者:里海
来源网站:https://blog.csdn.net/WangPaiFeiXingYuan
简介:
获取图层上的所有对象
代码:
//获取图层所有对象。对所有可选择的图层使用layer = 0
static void ask_all_objects_on_layer(int layer, vector<tag_t> &objects)
{
tag_t object = NULL_TAG;
while (!UF_CALL(UF_LAYER_cycle_by_layer(layer, &object)) &&
(object != NULL_TAG))
{
int type;
int subtype;
UF_CALL(UF_OBJ_ask_type_and_subtype(object, &type, &subtype));
//if ((type != UF_solid_type) || (subtype == UF_solid_body_subtype))
{
objects.push_back(object);
}
}
}