获取工作部件全部实体Tag
var theUf = UFSession.GetUFSession();
var list = new List<Tag>();
var sheet = Tag.Null;
var d_part = theUf.Part.AskDisplayPart();
while (true)
{
theUf.Obj.CycleObjsInPart(d_part, UFConstants.UF_solid_type, ref sheet);
if (sheet is Tag.Null) break;
theUf.Obj.AskTypeAndSubtype(sheet, out var type, out var subtype);
if (type is UFConstants.UF_solid_type && subtype is UFConstants.UF_solid_body_subtype)
{
theUf.Modl.AskBodyType(sheet, out var body_type);
if (body_type is UFConstants.UF_MODL_SHEET_BODY)
{
list.Add(sheet);
}
}
}
标签:objs,OBJ,C#,UFConstants,theUf,var,sheet,UF,type
From: https://blog.csdn.net/fhqiwmc/article/details/137150668