# Export Geometry to DWG or other format

**URL:** <https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764>\
**Category:** Geometry\
**Created:** [March 14, 2025, 1:01pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764 "2025-03-14T13:01:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BJozi](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@BJozi](https://forum.dynamobim.com/u/BJozi)\
**Post date:** [March 14, 2025, 1:01pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/1 "2025-03-14T13:01:24Z")

</div>

As part of a larger workflow I am trying to extract all rooms and areas from a Revit model into a very dumbed down manner comprising only the volumes of the rooms/areas, or even just their outlines. These will later be processed further in Rhino, which is why I am looking for a method to export geometry (or even lines) from Dynamo do a to a workable file type which can be read in Rhino. What I am trying to export is either an outline of all rooms or 3D geometry of rooms, so very basic information derived from the model.

I’m working with rooms and then their geometry, the same for areas. I found an export to SAT node, I believe this can’t be imported in Rhino though. Are there other packages which I can explore to export to DWG or other formats? I think it can even be just 2D lines but 3D is preferred.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/1/6103c85d5c0276aaf057626f7184a58db7b7e039.png)

—edit 2—

Added clarification to what I am trying to export, and not so much the data exchange from Dynamo to Rhino.

—edit—

A follow up question; can I assign properties to the geometry being created? The room name for example or can each geometry instance be assigned a colour (based on the room name)?

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 14, 2025, 1:13pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/2 "2025-03-14T13:13:22Z")

</div>

I think you should determine how you want to transfer the data and use it in Rhino first. My suggestion would be to use the Rhino plugin and not even worry about Dynamo.

[Rhino.Inside®.Revit](https://www.rhino3d.com/inside/revit/1.0/guides/revit-to-rhino)

---

<div class="post-metadata">

**Author:** ![BJozi](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@BJozi](https://forum.dynamobim.com/u/BJozi)\
**Post date:** [March 14, 2025, 1:24pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/3 "2025-03-14T13:24:16Z")

</div>

We briefly discussed this but I don’t recall why wouldn’t work well for us? We will be doing this on a lot of models, one after the other, to build up a database.

I believe Rhythm and or Spring Nodes may have nodes to export to DWG - no idea if this will work as I found chatGPT to not be very good at Dynamo.

A follow up question; can I assign properties to the geometry being created? The room name for example or can each geometry instance be assigned a colour (based on the room name)?

—edit—  
It might have been that we can instal plugins, or at least it can be hard for admin to instal something for you, and therefor decided to try and work with what we have/can use.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 14, 2025, 1:30pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/4 "2025-03-14T13:30:05Z")

</div>

The plugin is the best way to maintain properties and parameters. I think most other methods just deal with the geometry. Revit already exports to DWG with the native Export function so that seems like the best alternative based on what you’re asking. This is where we are really relying on you to determine what process works best for you and what information is required though. We can’t tell you how you should manage your workflow. If your question is really about how to handle data transfer between Revit and Rhino then you’re probably better off asking in one of those forums first.

---

<div class="post-metadata">

**Author:** ![BJozi](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@BJozi](https://forum.dynamobim.com/u/BJozi)\
**Post date:** [March 14, 2025, 2:00pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/5 "2025-03-14T14:00:14Z")

</div>

I should have been clearer in the OP, the output I am looking for from our models is a very basic volume or set of lines representing a layout of an apartment. We’re dumbing down the Revit data to something very simple and diagramatic. I have my script up to the point where I have geometry within Dynamo that I would like to export into a format readable in Rhino.

It’s not necessarily a Dynamo to Rhino worklfow, it just so happens that the other guy working on this will be using Rhino where he processes the data as a dwg and does something in it with Rhino

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 14, 2025, 2:16pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/6 "2025-03-14T14:16:59Z")

</div>

Try the native Export to DWG and see where that gets you. I don’t think you’re going to get much in the way of parameters and properties with an export. I think you’d have to use a data transfer method to keep that information.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 14, 2025, 3:03pm UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/7 "2025-03-14T15:03:07Z")

</div>

> [@BJozi](#):
>
> I believe this can’t be imported in Rhino though

😬

Rather than figure out Rhino Inside, Revit 2025 comes with Dynamo nodes to write to DWG, so you can leverage them to solve the root desire.

---

<div class="post-metadata">

**Author:** ![BJozi](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@BJozi](https://forum.dynamobim.com/u/BJozi)\
**Post date:** [March 18, 2025, 8:47am UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/8 "2025-03-18T08:47:20Z")

</div>

I don’t think the native export gives me the same granularity as I can get from Dynamo. I can export whole floor plans which is to much informations. With the script I can specify a group I want to work with and make the geometry of all Rooms and Areas in the group.

It doesn’t need to 3D but that would be ideal, also not a problem to lose any data. I can export Room/Areas names/areas etc to excel and the other guy can work with that.

Can the new nodes write geometry to DWG? Unfortunately we’re working with older models (2021 to 2024), if it works however it could be interesting to upgrade some of the projects (very time/resource consuming though).

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 18, 2025, 11:44am UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/9 "2025-03-18T11:44:28Z")

</div>

> [@BJozi](#):
>
> working with older models (2021 to 2024)

Time to ditch those 2021 and 2022 models anyway. The typical release cycle is 12 months, which means we’re weeks away form the 2027 products coming out. That means no more security updates for 2022, and 2021 is already 12 months outside of support. Keeping those versions in production is putting the entire business at risk for the benefit of ‘not having to update a model’, a process which should take less than an hour of real work.

That said, I get that you might not be able to do anything about the versions. You do have an obligation to let the the people who can know about risks such as [this one](https://www.autodesk.com/trust/security-advisories/adsk-sa-2024-0017), which had a score of 7.8 impacted all versions of Revit so a conservative approach assumes historical impact to unsupported builds. Such patches won’t come out for 2022

Ok… now that that is out of the way.

I think you might find that upgrading to 2025 and doing the export with the new nodes is the best path forward. It’s as simple as getting geometry which can be written to DWG (i.e. lines and solids are a go, polysurfaces are not) and using the node `Export Geometry File` with a the geometry as one input in the file path as the other. Note that this is a ‘overwrite’ action, so I recommend either planning on using the written DWGs as blocks in the assembled file, or reading the existing content and appending the new geometry to it and leaving annotations and views for a subsequent workflow rather than additive mid stream.

---

<div class="post-metadata">

**Author:** ![BJozi](https://avatars.discourse-cdn.com/v4/letter/b/2bfe46/32.png) [@BJozi](https://forum.dynamobim.com/u/BJozi)\
**Post date:** [March 20, 2025, 10:43am UTC](https://forum.dynamobim.com/t/export-geometry-to-dwg-or-other-format/108764/10 "2025-03-20T10:43:29Z")

</div>

Fortunately the old projects are finished projects or archive projects, the majority of live projects are in 2023 or 2024 and we’re switching to 2025 soon. Its not something I have control over. The script will only be used to open those project, extract the necessary information and move to the next project.

I was able to get a python script (via chatgpt) which works for what I need;

```auto
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

import os

# Inputs from Dynamo (reordered)
dxf_path = IN[0] # Output DXF filepath
room_curves = IN[1] # List of curve lists (each sublist = curves for one room)
layer_names = IN[2] # List of layer names for each room

# Check if input lists match
if len(room_curves) != len(layer_names):
    OUT = "Error: Number of room curve lists must match the number of layer names."
else:
    # Open DXF file for writing
    with open(dxf_path, "w") as f:
        f.write("0\nSECTION\n2\nHEADER\n0\nENDSEC\n")
        f.write("0\nSECTION\n2\nTABLES\n0\nENDSEC\n")
        f.write("0\nSECTION\n2\nBLOCKS\n0\nENDSEC\n")
        f.write("0\nSECTION\n2\nENTITIES\n")

        # Loop through each room's curves and write them to the DXF
        for i, curves in enumerate(room_curves):
            layer = layer_names[i] # Get the layer name for this room

            for curve in curves:
                if isinstance(curve, Line):
                    start = curve.StartPoint
                    end = curve.EndPoint
                    f.write(f"0\nLINE\n8\n{layer}\n10\n{start.X}\n20\n{start.Y}\n30\n{start.Z}\n")
                    f.write(f"11\n{end.X}\n21\n{end.Y}\n31\n{end.Z}\n")

                elif isinstance(curve, PolyCurve): # Handle PolyCurves
                    for seg in curve.Curves():
                        start = seg.StartPoint
                        end = seg.EndPoint
                        f.write(f"0\nLINE\n8\n{layer}\n10\n{start.X}\n20\n{start.Y}\n30\n{start.Z}\n")
                        f.write(f"11\n{end.X}\n21\n{end.Y}\n31\n{end.Z}\n")

        f.write("0\nENDSEC\n0\nEOF\n")

    OUT = dxf_path # Return file path

```

Quick testing this seems to work. I will have to work on the script to run it on more than one set of rooms and areas but that shouldn’t be to bad to get working.
