How to get boundaries from an element

Hi, I am trying to get boundaries from this solid desk but It’s not working with me

@Deniz_Maral @JacobSmall Can you help me to solve this Please?


Thanks Deniz I appreciate that so much

everything worked well but when I try to make run to true to export it to AutoCAD that what I want… the dynamo not responding and then Revit has closed. what can I do to solve this?

Why don’t you export as SAT and import to dwg?

I got it but I want to target dwg to manage layers and colors as one shot

I see, which package is that? I should check what it includes.

ExportGeometry from LinkDWG Package

actually It’s working with all curves but maybe curves on desk to much so we need to minimize number of them or find a way to find top boundary of desk just I need to export it as plan

Element.Faces to get the surfaces.

Surface.PointAtParameter to find the point at the center of the surface’s domain.

Point.Z to find the elevation of each point.

List.SortByKey to sort the surfaces by the Z values.

List.LastItem to pull the last surface from the reordered list.

thanks, @JacobSmall but It’s not working with me

Watch your list levels and lacing.

The error likely says something like “list as keys are not supported” because you’re feeding a list of objects in as the key. Set the keys inout to @L2 and see is that works.

error:Number of items does not match the number of keys.

Try setting both inputs to @L2, or flattening both lists.

@JacobSmall ok finally it’s working but maybe I have a conflict about why the number of the lists has the same value at start and end I think I need to reduce this number from all surface I need just top plane

Watch your list levels again.