Hi,
alternative with API Revit
import sys
import clr
clr.AddReference('ProtoGeometry')
import Autodesk.DesignScript.Geometry as DS
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
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.GeometryConversion)
topo = UnwrapElement(IN[0])
slabShape = topo.GetSlabShapeEditor()
pair_vertices = [p.EndPoints for p in slabShape.SlabShapeCreases if p.CreaseType == SlabShapeCreaseType.Boundary]
OUT = [DS.Line.ByStartPointEndPoint(vertA.Position.ToPoint(), vertB.Position.ToPoint()) for vertA, vertB in pair_vertices]
7 Likes
Hi, using Position property in disguised Enumerate
pretty
cordially
christian.stan
1 Like
Hi,
These solutions all break if the toposolid has a curved side. The Element.Faces node breaks and unable to return a face. The element.geometry node similarly not working.
They also won’t work if any of the toposolid’s point is not elevated which is a lesser problem and can be worked around. However the curve is a trouble, my toposolids are full of curves.
Is this a limitation of the dynamo nodes or revit api? Does anyone know a workaround?
Thanks
Hard to say without a dataset and knowing which version of Revit and Dynamo you are in. Can you post a simple Revit model (similar to the one above) in a new topic so we can test?
Hi Jacob,
I have opened an issue on github earlier today with all the info.
https://github.com/DynamoDS/Dynamo/issues/15241
btw this is in 2024.2 and dynamo 2.19.3 with any toposolid you sketch up with a curved side
Good to know the version, and thanks for the GitHub issue.
It would help to have an RVT posted though (here or there) as the Dynamo developers know C#, coding, and APIs fairly well, but not necessarily how to create a toposolid with a curved edge. As a result not having a sample file for stuff like this often extends the time to fix stuff by a few hours. If you get a chance to post one it would be appreciated.