diff --git a/src/CADShared/ExtensionMethod/DBDictionaryEx.cs b/src/CADShared/ExtensionMethod/DBDictionaryEx.cs
index 829b1ae9b5751da28ddb9335b6e18a956fe994e4..38c6b973cfc5311654d6e26a85e57b427ade7ae4 100644
--- a/src/CADShared/ExtensionMethod/DBDictionaryEx.cs
+++ b/src/CADShared/ExtensionMethod/DBDictionaryEx.cs
@@ -303,15 +303,17 @@ public static void SetValue(this DataCell cell, CellType type, object value)
/// 字典
/// 组名
/// 实体Id集合
+ /// 组内所有图元能否被一起选中
+ /// 编组的描述
/// 编组Id
- public static ObjectId AddGroup(this DBDictionary dict, string name, ObjectIdCollection ids)
+ public static ObjectId AddGroup(this DBDictionary dict, string name, ObjectIdCollection ids, bool selectable = true, string description = "")
{
if (dict.Contains(name))
return ObjectId.Null;
using (dict.ForWrite())
{
- Group g = new();
+ var g = new Group(description, selectable);
g.Append(ids);
dict.SetAt(name, g);
var tr = DBTrans.GetTopTransaction(dict.Database);
@@ -326,14 +328,16 @@ public static ObjectId AddGroup(this DBDictionary dict, string name, ObjectIdCol
/// 字典
/// 组名
/// 实体Id集合
+ /// 组内所有图元能否被一起选中
+ /// 编组的描述
/// 编组Id
- public static ObjectId AddGroup(this DBDictionary dict, string name, IEnumerable ids)
+ public static ObjectId AddGroup(this DBDictionary dict, string name, IEnumerable ids, bool selectable = true, string description = "")
{
if (dict.Contains(name))
return ObjectId.Null;
using ObjectIdCollection idc = new(ids.ToArray()); //需要using吗? 暂无测试
- return dict.AddGroup(name, idc);
+ return dict.AddGroup(name, idc, selectable, description);
}
diff --git a/src/CADShared/ExtensionMethod/ObjectIdEx.cs b/src/CADShared/ExtensionMethod/ObjectIdEx.cs
index ba790c204c4e70baee870c99c3f675f581937883..25fdeb7a67b11ddfbcbf5d2110f1bf64d4c77192 100644
--- a/src/CADShared/ExtensionMethod/ObjectIdEx.cs
+++ b/src/CADShared/ExtensionMethod/ObjectIdEx.cs
@@ -14,7 +14,7 @@ public static class ObjectIdEx
/// 打开模式
/// 是否打开已删除对象,默认为不打开
/// 是否打开锁定图层对象,默认为不打开
- /// 指定类型对象
+ /// 与对象id对应的DBObject实例
public static DBObject GetObject(this ObjectId id, OpenMode openMode = OpenMode.ForRead,
bool openErased = false, bool openLockedLayer = false)
{