Pandamo icon indicating copy to clipboard operation
Pandamo copied to clipboard

Accessing external Python runtime

Open MaximilianFranz opened this issue 5 years ago • 1 comments

Hey! First off, thanks for developing this package :)

Without having looked in detail at the architecture and implementation, how flexible is the bridge to the external Python3.7 runtime via the Flask server? To put it differently, is it possible to run any Python code snippet via that extension, in theory? Also, have you tried accessing RevitAPI and/or RevitNodes via pythonnet (clr) in the external CPython?

I am asking, because I am interested in getting a smoother integration of modern python features into Dynamo, without rewriting the whole PythonScript Nodes that run on IronPython.

Thanks a lot! All the best, Max

MaximilianFranz avatar Nov 14 '19 08:11 MaximilianFranz

Hi @MaximilianFranz

Sorry for not responding sooner, didn't receive any notifications about you're message so just saw this now.

In theory you can run what ever python code you want using the extension, the only limitation right now is that you need to create a custom ZT node for every python snippet you want to run. Basically the ZT node sends a Json string to whatever falsk endpoint you specify and the Python code will execute using the Json as the functions argument.

I haven't done anything with the RevitAPI yet, if you have specific use cases i would be happy to look into it.

SHKnudsen avatar Feb 18 '20 12:02 SHKnudsen