0

我正在尝试使用 Revit 2021 中的新 ImageType API 在我的模型中创建光栅图像实例。但是,它一直给我一个错误。

我的代码片段:

from rpw import DB

image_options = DB.ImageTypeOptions("C:\\temp\\response.jpg", False, DB.ImageTypeSource.Import)
image_options.Resolution = 72
image = DB.ImageType.Create(doc, image_options)

我得到的错误:

Exception: Failed to create ImageType due to internal error.

谁能帮我理解问题出在哪里?谢谢。

4

0 回答 0