diff --git a/NFox.Pycad.Zcad.dll b/NFox.Pycad.Zcad.dll
new file mode 100644
index 0000000000000000000000000000000000000000..4f0b884c3f17d4ff4fe97a72e04e3edff118014f
Binary files /dev/null and b/NFox.Pycad.Zcad.dll differ
diff --git a/NFox.Pycad.Zcad.pdb b/NFox.Pycad.Zcad.pdb
new file mode 100644
index 0000000000000000000000000000000000000000..40ab77efcdea21c0240b144a0d35f9b898f2bfa8
Binary files /dev/null and b/NFox.Pycad.Zcad.pdb differ
diff --git a/NFox.Pycad.dll b/NFox.Pycad.dll
index 52c75436d94194792558c38181c1024da0d3d646..f32f373260db734093551d42f3305a4a375cacf8 100644
Binary files a/NFox.Pycad.dll and b/NFox.Pycad.dll differ
diff --git a/NFox.Pycad.pdb b/NFox.Pycad.pdb
index 8cd6774428fb7d68a0717ffb04f4b7cac784e624..64aa16d0d0c07014f31765d07a6f59bd5bfb2984 100644
Binary files a/NFox.Pycad.pdb and b/NFox.Pycad.pdb differ
diff --git a/bin/NFox.Pycad.Runtime.dll b/bin/NFox.Pycad.Runtime.dll
index e73ef74d64162bdc4219c57e9a4dd84bf3d33ac7..9fc66c4c67d7dbd10cde7cb33d59ddecc1f2c108 100644
Binary files a/bin/NFox.Pycad.Runtime.dll and b/bin/NFox.Pycad.Runtime.dll differ
diff --git a/bin/NFox.Pycad.Runtime.pdb b/bin/NFox.Pycad.Runtime.pdb
index dd705800ada2012d26e61235e7a5c39057199602..ff7c0957a11735dab44533d29cc32e88b0a98064 100644
Binary files a/bin/NFox.Pycad.Runtime.pdb and b/bin/NFox.Pycad.Runtime.pdb differ
diff --git a/bin/NFox.Pycad.Setup.exe b/bin/NFox.Pycad.Setup.exe
index b7eca77e40691037bb99864c50b2bbc809680507..8f8bdb5104d3f954829b7c77c89eef8872137bab 100644
Binary files a/bin/NFox.Pycad.Setup.exe and b/bin/NFox.Pycad.Setup.exe differ
diff --git a/bin/NFox.Pycad.Setup.pdb b/bin/NFox.Pycad.Setup.pdb
index 6831d7ed31da5b9491a90349114ba8fe7ceeb5f6..4e053e0269d698d518cb89931a9b71a54c8f08e3 100644
Binary files a/bin/NFox.Pycad.Setup.pdb and b/bin/NFox.Pycad.Setup.pdb differ
diff --git a/extensions/parts/data/NFox.Expression.dll b/extensions/parts/data/NFox.Expression.dll
index b0514d16de10f549bb0215f1d2888a1175ef5ba5..4b417901335b74a1d266f4bce37f8c7e696aa02f 100644
Binary files a/extensions/parts/data/NFox.Expression.dll and b/extensions/parts/data/NFox.Expression.dll differ
diff --git a/extensions/parts/data/NFox.Expression.pdb b/extensions/parts/data/NFox.Expression.pdb
index 268528bbb8f33078eadbbc2a707823dc6fb159ab..91b5ea5568e427d218846e711e52760e839e00c0 100644
Binary files a/extensions/parts/data/NFox.Expression.pdb and b/extensions/parts/data/NFox.Expression.pdb differ
diff --git a/extensions/pycad/.vscode/settings.json b/extensions/pycad/.vscode/settings.json
index e42e119fc94b4e55d582c5b3c2aa8857d37144dc..e5c7b87fb46dc3149a17313f4f9c623407816528 100644
--- a/extensions/pycad/.vscode/settings.json
+++ b/extensions/pycad/.vscode/settings.json
@@ -2,5 +2,9 @@
"python.autoComplete.extraPaths": ["..\\.stubs\\pycadsys", "..\\.stubs\\clrclasses"],
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--ignore=E231,E262,E265,E401,E402,E501,E701,E704,E722,F403,F405,F811,W504", "--verbose"],
- "terminal.integrated.shell.windows": "${workspaceFolder}\\..\\..\\bin\\NFox.Pycad.Console.exe"
+ "terminal.integrated.shell.windows": "${workspaceFolder}\\..\\..\\bin\\NFox.Pycad.Console.exe",
+ "python.analysis.extraPaths": [
+ "..\\.stubs\\pycadsys",
+ "..\\.stubs\\clrclasses"
+ ]
}
\ No newline at end of file
diff --git a/extensions/pytest/.vscode/settings.json b/extensions/pytest/.vscode/settings.json
index 58ff2db64867224122d328f7e781a9421736da9c..c4156b4ba6a5fd58a181ca6a0b7522b0984c1580 100644
--- a/extensions/pytest/.vscode/settings.json
+++ b/extensions/pytest/.vscode/settings.json
@@ -3,5 +3,9 @@
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--ignore=E231,E262,E265,E302,E303,E401,E402,E501,E701,E704,E722,F403,F405,F811,W391,W504", "--verbose"],
- "terminal.integrated.shell.windows": "${workspaceFolder}\\..\\..\\bin\\NFox.Pycad.Console.exe"
+ "terminal.integrated.shell.windows": "${workspaceFolder}\\..\\..\\bin\\NFox.Pycad.Console.exe",
+ "python.analysis.extraPaths": [
+ "..\\.stubs\\pycadsys",
+ "..\\.stubs\\clrclasses"
+ ]
}
\ No newline at end of file
diff --git a/extensions/pytest/extension/cmds/runtime.py b/extensions/pytest/extension/cmds/runtime.py
index 798b51dc7625df56df06ac6f7fd2721e95ae11cb..1bd857e6c9c8e3c14de2a81f0b4c0cf1a19f5033 100644
--- a/extensions/pytest/extension/cmds/runtime.py
+++ b/extensions/pytest/extension/cmds/runtime.py
@@ -71,6 +71,10 @@ class clstest:
@vcm.apply("gcad")
def func(self):
print("gcad", -1)
+
+ @vcm.apply("zcad")
+ def func(self):
+ print("zcad", -1)
def pickfirst_changed(sender, e):
diff --git a/plugins/NFox.Pycad.Core/NFox.Pycad.Core.dll b/plugins/NFox.Pycad.Core/NFox.Pycad.Core.dll
index e2b84058f93f464db8978744cff5a31a3ca83ab1..9337ebf561128ee36f626a313f29d0e5ac3cf4ad 100644
Binary files a/plugins/NFox.Pycad.Core/NFox.Pycad.Core.dll and b/plugins/NFox.Pycad.Core/NFox.Pycad.Core.dll differ
diff --git a/plugins/NFox.Pycad.Core/NFox.Pycad.Core.pdb b/plugins/NFox.Pycad.Core/NFox.Pycad.Core.pdb
index c88e1fc84c144a5e5b657d222b8b93e7f557a32b..31da6b70bde3c31ed09a77cd1d14ff854ac7715d 100644
Binary files a/plugins/NFox.Pycad.Core/NFox.Pycad.Core.pdb and b/plugins/NFox.Pycad.Core/NFox.Pycad.Core.pdb differ
diff --git a/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.dll b/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.dll
index 307d2963935f63b67c93e5c1208694165634618d..9d1678779269e8bc6694688d29d73f3812e4607a 100644
Binary files a/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.dll and b/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.dll differ
diff --git a/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.pdb b/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.pdb
index 73d803a5e219de793474e2a6dc10c313d9a93ab1..0b742c2087f35f9646fb5545ecf7d62e7f6c1f80 100644
Binary files a/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.pdb and b/plugins/NFox.Pycad.Servers/NFox.Pycad.Servers.pdb differ
diff --git a/plugins/NFox.Pycad.Update/NFox.Pycad.Update.dll b/plugins/NFox.Pycad.Update/NFox.Pycad.Update.dll
index 86f226a4e8b612958d957bb26d91d7965dd1b52d..c4a88a512c3cc22021f0f4284d7d213ca6cf6ad9 100644
Binary files a/plugins/NFox.Pycad.Update/NFox.Pycad.Update.dll and b/plugins/NFox.Pycad.Update/NFox.Pycad.Update.dll differ
diff --git a/plugins/NFox.Pycad.Update/NFox.Pycad.Update.pdb b/plugins/NFox.Pycad.Update/NFox.Pycad.Update.pdb
index b6d5eec69f8cb3e946e95de1d40750b6aa1ca609..f44eb49235667335104de7289490aaeb799930ff 100644
Binary files a/plugins/NFox.Pycad.Update/NFox.Pycad.Update.pdb and b/plugins/NFox.Pycad.Update/NFox.Pycad.Update.pdb differ
diff --git a/src/Cad.NetRefences/ZwDatabaseMgd.dll b/src/Cad.NetRefences/ZwDatabaseMgd.dll
new file mode 100644
index 0000000000000000000000000000000000000000..4b2ff62da8d5f834dadc5602e7d582528905e574
Binary files /dev/null and b/src/Cad.NetRefences/ZwDatabaseMgd.dll differ
diff --git a/src/NFox.Pycad.Core/DynamicCompiler.cs b/src/NFox.Pycad.Core/DynamicCompiler.cs
index bb5cbecad8b4719bbd67217d0273fd47c29ea327..aa903862bddf85ced6661e03fa6b9d96bec46d95 100644
--- a/src/NFox.Pycad.Core/DynamicCompiler.cs
+++ b/src/NFox.Pycad.Core/DynamicCompiler.cs
@@ -35,6 +35,9 @@ namespace NFox.Pycad
case "gcad":
ns.Imports.Add(new CodeNamespaceImport("GrxCAD.Runtime"));
break;
+ case "zcad":
+ ns.Imports.Add(new CodeNamespaceImport("ZwSoft.ZwCAD.Runtime"));
+ break;
}
//在命名空间下添加一个类
@@ -119,6 +122,10 @@ namespace NFox.Pycad
ns.Imports.Add(new CodeNamespaceImport("GrxCAD.Runtime"));
ns.Imports.Add(new CodeNamespaceImport("GrxCAD.DatabaseServices"));
break;
+ case "zcad":
+ ns.Imports.Add(new CodeNamespaceImport("ZwSoft.ZwCAD.Runtime"));
+ ns.Imports.Add(new CodeNamespaceImport("ZwSoft.ZwCAD.DatabaseServices"));
+ break;
}
//在命名空间下添加一个类
diff --git a/src/NFox.Pycad.Core/Modules/pye.cs b/src/NFox.Pycad.Core/Modules/pye.cs
index b9869af31a4cec426a4009ae64e7ed8ad440b920..8e292cb6db7b1b3a88e97599a37930d7775b4221 100644
--- a/src/NFox.Pycad.Core/Modules/pye.cs
+++ b/src/NFox.Pycad.Core/Modules/pye.cs
@@ -80,9 +80,13 @@ namespace NFox.Pycad.Core.Modules
.OpenSubKey("VSCode")?
.GetValue("Icon")?
.ToString();
- if (rpath != null && !File.Exists(rpath))
- rpath = null;
- pro.StartInfo.FileName = rpath ?? getvar("editor.path");
+ if (rpath == null || !File.Exists(rpath))
+ rpath = getvar("editor.path");
+
+ if (rpath == null || !File.Exists(rpath))
+ rpath = "code";
+
+ pro.StartInfo.FileName = rpath;
pro.StartInfo.Arguments = $"\"{path}\\\"";
pro.Start();
}
diff --git a/src/NFox.Pycad.Setup/frmSetup.cs b/src/NFox.Pycad.Setup/frmSetup.cs
index cefc4bd08d9849f62d7b93601d527493dbca4958..9dbfa34ed7800557254479c13b8b4604fe079376 100644
--- a/src/NFox.Pycad.Setup/frmSetup.cs
+++ b/src/NFox.Pycad.Setup/frmSetup.cs
@@ -57,6 +57,7 @@ namespace NFox.Pycad.Setup
_ass = Assembly.Load(ms.ToArray());
dynamic avers = GetVersions(_ass.GetType("NFox.Pycad.AcadVersion"));
dynamic gvers = GetVersions(_ass.GetType("NFox.Pycad.GcadVersion"));
+ dynamic zvers = GetVersions(_ass.GetType("NFox.Pycad.ZcadVersion"));
var num = Math.Max(avers.Count, gvers.Count);
tableLayoutPanel4.ColumnCount = num;
diff --git a/src/NFox.Pycad.Zcad/Application.cs b/src/NFox.Pycad.Zcad/Application.cs
new file mode 100644
index 0000000000000000000000000000000000000000..e2a2d558e05a93b932a37714f60aa0c61badef5b
--- /dev/null
+++ b/src/NFox.Pycad.Zcad/Application.cs
@@ -0,0 +1,19 @@
+
+
+using ZwSoft.ZwCAD.Runtime;
+
+[assembly: ExtensionApplication(typeof(NFox.Pycad.Zcad.Application))]
+
+namespace NFox.Pycad.Zcad
+{
+ public class Application : Pycad.Application, IExtensionApplication
+ {
+ protected override void OnInitializing()
+ {
+ HostAppName = "zcad";
+ base.OnInitializing();
+ }
+
+ }
+
+}
diff --git a/src/NFox.Pycad.Zcad/NFox.Pycad.Zcad.csproj b/src/NFox.Pycad.Zcad/NFox.Pycad.Zcad.csproj
new file mode 100644
index 0000000000000000000000000000000000000000..3b88d75b26e17dcee80cb7550a7888714df512f7
--- /dev/null
+++ b/src/NFox.Pycad.Zcad/NFox.Pycad.Zcad.csproj
@@ -0,0 +1,71 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {DB1FE4C4-8DB5-4E8C-AF6E-7EC39115A8E4}
+ Library
+ Properties
+ NFox.Pycad.Zcad
+ NFox.Pycad.Zcad
+ v4.7
+ 512
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ ..\..\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\Cad.NetRefences\ZwDatabaseMgd.dll
+ False
+
+
+
+
+
+
+
+
+ {6912653d-5edb-4256-9786-09a27c779f35}
+ NFox.Pycad
+ False
+
+
+
+
+
\ No newline at end of file
diff --git a/src/NFox.Pycad.Zcad/Properties/AssemblyInfo.cs b/src/NFox.Pycad.Zcad/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000000000000000000000000000000000..9c1bd0513d0823e89f06adf37366acaee347c66e
--- /dev/null
+++ b/src/NFox.Pycad.Zcad/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("NFox.Pycad.Zcad")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("NFox.Pycad.Zcad")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//将 ComVisible 设置为 false 将使此程序集中的类型
+//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("30c82168-e63c-4f52-8675-5685d358083e")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/NFox.Pycad.sln b/src/NFox.Pycad.sln
index e6b2c06382d4aaeb0a21a0831c10abb78ec1f0e6..04c1bb4700b9131e3b8dac20753e00598671a884 100644
--- a/src/NFox.Pycad.sln
+++ b/src/NFox.Pycad.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.33414.496
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NFox.Pycad.Core", "NFox.Pycad.Core\NFox.Pycad.Core.csproj", "{34B8F15E-A2D8-4C01-9617-1073893D51C9}"
EndProject
@@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NFox.Expression", "NFox.Exp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NFox.Pycad.Setup", "NFox.Pycad.Setup\NFox.Pycad.Setup.csproj", "{71F09F6C-4201-4F0B-9BC9-A05B5DF22F7C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NFox.Pycad.Zcad", "NFox.Pycad.Zcad\NFox.Pycad.Zcad.csproj", "{DB1FE4C4-8DB5-4E8C-AF6E-7EC39115A8E4}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -69,6 +71,10 @@ Global
{71F09F6C-4201-4F0B-9BC9-A05B5DF22F7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71F09F6C-4201-4F0B-9BC9-A05B5DF22F7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71F09F6C-4201-4F0B-9BC9-A05B5DF22F7C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB1FE4C4-8DB5-4E8C-AF6E-7EC39115A8E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB1FE4C4-8DB5-4E8C-AF6E-7EC39115A8E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB1FE4C4-8DB5-4E8C-AF6E-7EC39115A8E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB1FE4C4-8DB5-4E8C-AF6E-7EC39115A8E4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/NFox.Pycad/NFox.Pycad.csproj b/src/NFox.Pycad/NFox.Pycad.csproj
index 6900ca4e00b1483c67a9ac4457a6b77b286f7256..8f6268f50dfff102f82c6ccfdc29d8b06a99f847 100644
--- a/src/NFox.Pycad/NFox.Pycad.csproj
+++ b/src/NFox.Pycad/NFox.Pycad.csproj
@@ -42,6 +42,7 @@
+
diff --git a/src/NFox.Pycad/Versions/VersionBase.cs b/src/NFox.Pycad/Versions/VersionBase.cs
index b8c8bee01ba165877c6688fa9d5a8021b09e2372..bcaca94317d8264d5953e65c65f8355cdd831a65 100644
--- a/src/NFox.Pycad/Versions/VersionBase.cs
+++ b/src/NFox.Pycad/Versions/VersionBase.cs
@@ -57,6 +57,15 @@ namespace NFox.Pycad
}
+ // 注册ZWCAD
+ foreach (var ver in ZcadVersion.Versions)
+ {
+ if (ver.Number >= 2021)
+ ver.RegApp(
+ "NFox.Pycad",
+ root.GetFileFullName("NFox.Pycad.Zcad.dll"),
+ "NFox Pycad Loader");
+ }
}
}
diff --git a/src/NFox.Pycad/Versions/ZcadVersion.cs b/src/NFox.Pycad/Versions/ZcadVersion.cs
new file mode 100644
index 0000000000000000000000000000000000000000..e7fdb9422c4699149d1ea01637ef79f9911cce4e
--- /dev/null
+++ b/src/NFox.Pycad/Versions/ZcadVersion.cs
@@ -0,0 +1,123 @@
+using Microsoft.Win32;
+using System.Collections.Generic;
+using System.IO;
+using System.Text.RegularExpressions;
+using System.Linq;
+
+namespace NFox.Pycad
+{
+ public class ZcadVersion: VersionBase
+ {
+ const string _pattern = @"ZwSoft\\([^\\]*)\\(20\d2)\\.*?";
+
+ private ZcadVersion(string rootkey)
+ {
+ var gs = Regex.Match(rootkey, _pattern).Groups;
+
+ //从注册表获取版本信息
+ ProductRootKey = "Software\\" + rootkey;
+ Major = int.Parse(gs[2].Value);
+ Minor = Major;
+ Number = Major;
+ ProductName = $"{gs[1].Value.ToUpper()} {Major}";
+ }
+
+ private static List _versions;
+ public static List Versions
+ {
+ get
+ {
+ if (_versions == null)
+ {
+ _versions = new List();
+ try
+ {
+ using (var zwsoftKey = Registry.LocalMachine.OpenSubKey("Software\\ZwSoft"))
+ {
+ foreach (var zwcadName in zwsoftKey.GetSubKeyNames())
+ {
+ using (var zwcadKey = zwsoftKey.OpenSubKey(zwcadName))
+ {
+ foreach (var yearName in zwcadKey.GetSubKeyNames())
+ {
+ using (var yearKey = zwcadKey.OpenSubKey(yearName))
+ {
+ foreach (var lanName in yearKey.GetSubKeyNames())
+ {
+ using (var lanKey = yearKey.OpenSubKey(lanName))
+ {
+ ZcadVersion ver = new ZcadVersion($@"ZwSoft\{zwcadName}\{yearName}\{lanName}");
+ _versions.Add(ver);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch { }
+ }
+ return _versions;
+ }
+ }
+
+ public override void RegApp(string name, string location, string desc)
+ {
+
+ var info = new AssemInfo(name, location, desc);
+
+ try
+ {
+
+ //注册预加载程序集
+ using (var rootkey = Registry.CurrentUser.OpenSubKey(ProductRootKey, true))
+ using (var appskey = rootkey.CreateSubKey("Applications"))
+ using (var rk = appskey.CreateSubKey(info.Name))
+ {
+ rk.SetValue("DESCRIPTION", info.Description, RegistryValueKind.String);
+ rk.SetValue("LOADER", info.Location, RegistryValueKind.String);
+ rk.SetValue("LOADCTRLS", info.LoadType, RegistryValueKind.DWord);
+ rk.SetValue("MANAGED", 1, RegistryValueKind.DWord);
+
+
+ try
+ {
+ //添加信任目录
+ using (var profileskey = rootkey.OpenSubKey("Profiles"))
+ {
+ foreach (string keyname in profileskey.GetSubKeyNames())
+ {
+ using (var profilekey = profileskey.OpenSubKey(keyname))
+ using (var variableskey = profilekey?.OpenSubKey("Variables", true))
+ {
+ string paths = variableskey?.GetValue("TRUSTEDPATHS")?.ToString();
+ if (paths != null)
+ {
+ List names = new List();
+ if (paths != "")
+ {
+ foreach (string s in paths.Split(';'))
+ names.Add(s.ToLower());
+ }
+ string path = Path.GetDirectoryName(info.Location);
+ if (!names.Contains(path.ToLower()))
+ {
+ names.Add(path);
+ variableskey.SetValue("TRUSTEDPATHS", string.Join(";", names));
+ }
+ }
+ }
+ }
+ }
+ }
+ catch { }
+ }
+ }
+ catch { }
+
+ }
+
+ }
+
+}
diff --git a/support/pycad/system/mgdnss.py b/support/pycad/system/mgdnss.py
index 2a9246b1d65d043421867321bd45d495b730e128..1e1b343e309e5da31ec4dcca9e799f77b65b226d 100644
--- a/support/pycad/system/mgdnss.py
+++ b/support/pycad/system/mgdnss.py
@@ -54,6 +54,24 @@ mgds = {
"acps": "GrxCAD.PlottingServices",
"acco": "GrxCAD.Colors",
}
+ },
+ 'zcad': {
+ 'mgds': (
+ ('ZwManaged.dll', 'ZwDatabaseMgd.dll'),
+ ('System', 'System.Core')),
+ 'nss': {
+ "acap": "ZwSoft.ZwCAD.ApplicationServices",
+ "acdb": "ZwSoft.ZwCAD.DatabaseServices",
+ "aced": "ZwSoft.ZwCAD.EditorInput",
+ "acge": "ZwSoft.ZwCAD.Geometry",
+ "acrx": "ZwSoft.ZwCAD.Runtime",
+ "acws": "ZwSoft.ZwCAD.Windows",
+ "acgi": "ZwSoft.ZwCAD.GraphicsInterface",
+ "acgs": "ZwSoft.ZwCAD.GraphicsSystem",
+ "acin": "ZwSoft.ZwCAD.Internal",
+ "acps": "ZwSoft.ZwCAD.PlottingServices",
+ "acco": "ZwSoft.ZwCAD.Colors",
+ }
}
}