在 Revit 设计自动化中解决装配体

问题描述 投票:0回答:1

我正在使用设计自动化根据 CSV 文件中的数据修改族参数值。我使用的 CSV 库取决于 Microsoft.Bcl.AsyncInterfaces v1.0.0.0+,我使用的 JSON 库取决于 Microsoft.Bcl.AsyncInterfaces v7.0.0.0。我只能在我的 AppBundle 中包含一个或另一个(由于同一目录中的重复命名),但无论哪种方式,我都会根据缺少的任何一个从 DA4R 运行时获得异常:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

此加载项的本地版本使用带有绑定重定向的 app.config 文件来解决此问题,但我的 DA4R 版本无法正常工作,因为它不包含该文件。

基于这个示例我认为自定义程序集解析函数可以工作,但我不知道如何访问程序集文件的位置。

本地运行时目录仅包含我的工作文件,不包含我的AppBundle文件。我可以看到这些文件位于

T:\Aces\Applications\ffc6436bec04d21d55ea37de192e1fe6.<APPNAME>.<ACTIVITYNAME>[##].package
,但出于明显的原因,我不想将我当前的版本号硬编码到我的源代码中。

我走在正确的道路上还是有更简单的方法?

dll autodesk-forge revit-api autodesk-designautomation
1个回答
0
投票

是的,您可以在WorkItem运行过程中访问AppBundle文件。请参阅:https://forge.autodesk.com/blog/handle-command-line-argumentshttps://forge.autodesk.com/blog/store-template-documents-appbundle

© www.soinside.com 2019 - 2024. All rights reserved.