BIM World
A Professional BIM Learning Platform


Using Dynamo in Revit: How to Reference Python .py Files in Python Script

From the previous two blog posts, we have seen that Python Script integrates well with DLL files and can even incorporate WinForm windows. Naturally, this leads to the question of whether Python’s .py files can be referenced within Python Script.

Here is a direct example for clarity: Figure 1 shows a .py file, and Figure 2 displays the corresponding Python Script.

Dynamo programming in Revit - referencing Python py files in Python ScriptDynamo programming in Revit - referencing Python py files in Python Script

However, an unusual issue arises: within Python Script, the referenced file does not behave like a typical imported module in a standard Python environment. As shown in the following image, the output in Dynamo is blank.

Dynamo programming in Revit - referencing Python py files in Python Script

xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » Using Dynamo in Revit: How to Reference Python .py Files in Python Script

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up