使用 UF_OBJ_cycle_objs_in_part 函数遍历图档全部实体。
var theUf = UFSession.GetUFSession();
var list = new List<Tag>();
var solid = Tag.Null;
var d_part = theUf.Part.AskDisplayPart();
while (true) {
theUf.Obj.CycleObjsInPart(d_part, UFConstants.UF_solid_type, ref solid);
if (solid == Tag.Null) break;
theUf.Obj.AskTypeAndSubtype(solid, out var type, out var subtype);
if (type == UFConstants.UF_solid_type && subtype == UFConstants.UF_solid_body_subtype) {
list.Add(solid);
}
}