diff --git a/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs b/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs
index e6f566041731582fb5e2e0544ff199d4024257b3..109d5cae69eb106e83a0215e04215a1f8f238e4e 100644
--- a/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs
+++ b/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs
@@ -1,6 +1,7 @@
-#if a2024 || zcad
+#if !NET8_0_OR_GREATER
namespace System.Runtime.CompilerServices;
+#endif
///
/// 指示参数将为另一个参数传递的表达式捕获为字符串。
///
@@ -11,10 +12,7 @@ internal sealed class CallerArgumentExpressionAttribute : Attribute
/// 初始化 CallerArgumentExpressionAttribute 类的新实例。
///
/// 参数名
- public CallerArgumentExpressionAttribute(string parameterName)
- {
- ParameterName = parameterName;
- }
+ public CallerArgumentExpressionAttribute(string parameterName) => ParameterName = parameterName;
///
/// 获取其表达式应捕获为字符串的参数的名称。
@@ -22,4 +20,7 @@ public CallerArgumentExpressionAttribute(string parameterName)
// ReSharper disable once UnusedAutoPropertyAccessor.Global
public string ParameterName { get; }
}
-#endif
\ No newline at end of file
+
+
+
+
diff --git a/src/CADShared/ExtensionMethod/Jig/JigEx.cs b/src/CADShared/ExtensionMethod/Jig/JigEx.cs
index c98511007a083be3b9a5100c00636e61f53aecd5..60afabdd61c980c867ae326837541a4ccaf64bc4 100644
--- a/src/CADShared/ExtensionMethod/Jig/JigEx.cs
+++ b/src/CADShared/ExtensionMethod/Jig/JigEx.cs
@@ -259,15 +259,9 @@ public void SetOptions(Action action)
/// 执行
///
/// 交互结果
- [Obsolete("将在下个版本中删除,请使用Editor.Drag(JigEx)")]
- public PromptResult Drag()
+ public PromptResult Drag()//
{
- // jig功能必然是当前前台文档,所以封装内部更好调用
- var dm = Acaop.DocumentManager;
- var doc = dm.MdiActiveDocument;
- var ed = doc.Editor;
- var dr = ed.Drag(this);
- return dr;
+ return Env.Jig(this);
}
diff --git a/src/CADShared/Runtime/Env.cs b/src/CADShared/Runtime/Env.cs
index 3f88e3678d53491b5de373bce35a2faa9f0478cc..2f6156d359637b54df576cf7c948898b3231edbf 100644
--- a/src/CADShared/Runtime/Env.cs
+++ b/src/CADShared/Runtime/Env.cs
@@ -704,6 +704,16 @@ public static bool IsUcs()
}
+ ///
+ /// 执行Jig
+ ///
+ ///
+ ///
+ public static PromptResult Jig(JigEx jig)
+ {
+ return Editor.Drag(jig);
+ }
+
#region dwg版本号/cad版本号/年份
///