-
-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyRevit - Dynamo Incompatibility: Two versions of Same DLL #1731
Comments
More digging on Python yielded subprocess to run external programs in Python. Running a subprocess fit the bill perfectly in that a Python script can be run outside the pyRevit environment. This keeps dependencies separated from one another which facilitates interoperability despite package versioning over time. Basic bundle setup:
An example programSubprocess_script.py:
Given the general interest in using Python packages, it would be beneficial to include detailed documentation on how pyRevit can make use of subprocesses. |
I guess we can close this one. |
Describe the bug
The Dynamo version of Topologic relies on an older DLLs. topologicpy relies on newer DLLs and has desirable added features for use with pyRevit CPython. I am trying to use methods from Topologic in Dynamo graphs and topologicpy in pyRevit in the same Revit session. If Topologic Dynamo graphs are used first subsequent topologicpy CPython scripts can't import necessary modules. If topologicpy CPython scripts are used first subsequent Topologic Dynamo graphs have broken nodes because Dynamo claims it cannot find the required Topologic package.
The problem concept faced seems to be described fairly well by: How to use two versions of the same DLL in the same project.
To Reproduce
Run Topologic Dynamo graph,
Run topologicpy CPython script,
topologicpy CPython script cannot import necessary module.
Run topologicpy CPython script,
Run Topologic Dynamo graph,
Dynamo graph has broken nodes because Dynamo claims it cannot find the required package.
Expected behavior
I was hoping the CPython environment would be isolated in something like a virtual environment. But it seems like DLLs are applied universally in a Revit session. As a result, the Dynamo Topologic package based on Python infrastructure that varies across distribution channels includes functions whose use is mutually excluded. This was not expected.
Desktop (please complete the following information):
Additional context
The observed behavior is probably more of a mechanization observation than a bug. However, as an end user the behavior presents itself like a bug.
I looked around for a way that pyRevit might trigger a python script to run in an environment external to Revit. For my use case that should work well enough. However, I was not able to find guidance on how pyRevit might trigger a python script to run in an environment external to Revit.
Thank you for your consideration.
The text was updated successfully, but these errors were encountered: