需要获取图层类别,需要循环遍历UFConstants.UF_layer_category_type来获取.
public IList<Tag> GetCategory()
{
var theSession = Session.GetSession();
var theWork = theSession.Parts.Work;
var theUf = UFSession.GetUFSession();
var list = new List<Tag>();
Tag tag = Tag.Null;
theUf.Obj.CycleObjsInPart(theWork.Tag, UFConstants.UF_layer_category_type, ref tag);
while (tag is not Tag.Null)
{
list.Add(tag);
theUf.Obj.CycleObjsInPart(theWork.Tag, UFConstants.UF_layer_category_type, ref tag);
}
return list;
}