NX二次开发源码分享:获取所有的图纸相关对象
static int ask_all_drf_objects(tag_t **objects)
{
int
subtype,
type;
tag_t
object = NULL_TAG;
uf_list_p_t
list;
UF_CALL(UF_MODL_create_list(&list));
while (!UF_CALL(UF_LAYER_cycle_by_layer(0, &object))
&& (object != NULL_TAG))
{
UF_CALL(UF_OBJ_ask_type_and_subtype(object, &type, &subtype));
if ((type == UF_drafting_entity_type) ||
(type == UF_dimension_type) ||
(type == UF_note_type) ||
(type == UF_tol_feature_instance_type) ||
((type == UF_tabular_note_type) &&
(subtype == UF_tabular_note_section_subtype)) ||
(type == UF_smart_model_instance_type) ||
(type == UF_pmi_filter_type))
UF_CALL(UF_MODL_put_list_item(list, object));
}
return make_an_array(&list, objects);
}
页:
[1]