import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
elems = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
TransactionManager.Instance.TransactionTaskDone()
OUT = elems
hi,It can be achieved with IronPython, but with Cpython it still doesn’t report an error, showing “NameErrer”.
Question.dyn (3.2 KB)
hi, there is only PythonScript here, but it still reports an error, can you see why?
@Dongzi your file is working from my side as well, I think you need to install Python 3. on your machine.
I installed Python 3.8.3, and everything else runs normally. Excuse me, is your Dynamo version up to date? Revit2022 version used?
I am using Revit 2022 Dynamo 2.12.0
I am using Revit2021, and then upgraded Dynamo to 2.10, will it be the reason for my upgrade.I’m using the cracked version. . The original is too expensive. . . .
hello @Dongzi
any reference to cracked software versions is prohibited on this forum.
CPython3 engine is not available before Revit 2022, this topic will be closed
Note:
if you are a student, try to apply for an educational license of Revit