C# TEKLA 二次开发 版本兼容性解决方案

制作的exe程序,就存在版本兼容性问题

用2022 api编译的exe在2024 中无法启动

解决方案

将exe放在如下位置从此处启动exe即可

 

从宏中可以获取

 string XSDATADIR = "";
TeklaStructuresSettings.GetAdvancedOption("XSDATADIR", ref XSDATADIR);
 string extensionDir = Path.Combine(XSDATADIR, "Environments\\common\\extensions");

参考的资料

多个 Tekla 版本的同一应用程序问题(2024 年和 2022 年) - API - 一般讨论 - Tekla Discussion Forum --- Same application for multiple Tekla versions issue (2024 and 2022) - API - General discussions - Tekla Discussion Forum

 

Hello,  你好,

Application .exe file must be copied to /environments/common/extension/ subfolder of version 2024. This version creates .exe.config files automatically while previous versions require the applications to be installed with TSEP.
应用程序 .exe 文件必须复制到版本 2024 的 /environments/common/extension/ 子文件夹中。此版本会自动创建 .exe.config 文件,而以前的版本要求应用程序与 TSEP 一起安装。

Another option is to look for teklastructures.exe.config file available for each version of TeklaStructures in the /bin/  folder.
另一种选择是在 /bin/ 文件夹中查找适用于每个 TeklaStructures 版本的 teklastructs.exe.config 文件。

Then, copy the file and rename it as TestAnyVersion.exe.config
然后,复制该文件并将其重命名为 TestAnyVersion.exe.config

Regards, 问候,

posted @ 2024-06-17 22:50  南胜NanSheng  阅读(7)  评论(0编辑  收藏  举报