Describe the bug
I am trying to create a Topography by Mesh node, it is fully working in Dynamo Python so it should be straight forward to convert into Rhino.Inside. Revit is throwing an exception:
A transaction or sub-transaction was opened but not closed. All changes to the active document made by External Command will be discarded.
import clr
clr.AddReference('System.Core')
clr.AddReference('RhinoInside.Revit')
clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
import rhinoscriptsyntax as rs
import Rhino
import RhinoInside
import Grasshopper
from RhinoInside.Revit import Revit
from Autodesk.Revit import DB
import System
doc = Revit.ActiveDBDocument
faces = []
for i in range(MeshFaces.BranchCount):
branchList = MeshFaces.Branch(i)
branchPath = MeshFaces.Path(i)
faces.append(DB.PolymeshFacet(branchList[0],branchList[1],branchList[2]))
t = DB.Transaction(doc, "Create Topo from Mesh")
if run:
t.Start()
topo = DB.Architecture.TopographySurface.Create(doc, Points, faces)
t.Commit()
Change the extension of the txt to gh and you will see the script.
TopoFromMesh.txt
Describe the bug I am trying to create a Topography by Mesh node, it is fully working in Dynamo Python so it should be straight forward to convert into Rhino.Inside. Revit is throwing an exception:
A transaction or sub-transaction was opened but not closed. All changes to the active document made by External Command will be discarded.
Change the extension of the txt to gh and you will see the script. TopoFromMesh.txt