# Open dwg in dynamo sandbox

**URL:** <https://forum.dynamobim.com/t/open-dwg-in-dynamo-sandbox/102848>\
**Category:** Forma\
**Created:** [July 17, 2024, 2:57pm UTC](https://forum.dynamobim.com/t/open-dwg-in-dynamo-sandbox/102848 "2024-07-17T14:57:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [July 17, 2024, 2:57pm UTC](https://forum.dynamobim.com/t/open-dwg-in-dynamo-sandbox/102848/1 "2024-07-17T14:57:26Z")

</div>

Is it possible to open a dwg or dxf in dynamo sandbox?  
I want to use it to bring solids inside forma.

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [July 17, 2024, 3:01pm UTC](https://forum.dynamobim.com/t/open-dwg-in-dynamo-sandbox/102848/2 "2024-07-17T15:01:25Z")

</div>

I found this old thread for Dynamo studio:

> **[DWG Import in Dynamo Studio 0.9.1 - Dynamo BIM](https://dynamobim.org/dwg-import-in-dynamo-studio-0-9-1/)**
>
> I work with very smart people on a daily basis. That’s a given, because I work on the Dynamo team. Also as an added incentive of my job, when people do deliver cool stuff, I get to write about it. Like, last week, when we delivered Dynamo Studio...

but I wonder if there is anything similar for sandbox.  
The reason I dont want to do it in Revit is because we are long way to get to r2024.

---

<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:** [July 17, 2024, 4:11pm UTC](https://forum.dynamobim.com/t/open-dwg-in-dynamo-sandbox/102848/3 "2024-07-17T16:11:00Z")

</div>

> [@BIMadmin](#):
>
> but I wonder if there is anything similar for sandbox.

Not readily at the moment. There is work underway to add more basic file functionality out of the box which might make importing DWGs doable in sandbox in the future.

For now you might be able to use the LinkDWG package or LinkDWG2 package, or BriMohareb package, all of which will require you open a particular version of Civil 3D or AutoCAD to make things work. Alternatively you can look at using Dynamo for Civil 3D for more direct DWG interaction.

---

<div class="post-metadata">

**Author:** ![BIMadmin](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@BIMadmin](https://forum.dynamobim.com/u/BIMadmin)\
**Post date:** [July 18, 2024, 9:45am UTC](https://forum.dynamobim.com/t/open-dwg-in-dynamo-sandbox/102848/4 "2024-07-18T09:45:09Z")

</div>

Hi Jacob, thanks for letting me know.

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [July 20, 2024, 7:06pm UTC](https://forum.dynamobim.com/t/open-dwg-in-dynamo-sandbox/102848/5 "2024-07-20T19:06:51Z")

</div>

Hi,

if 3DSolids can be converted to Meshes (in Autocad), you can use libraries such as netDxf to read and convert entities

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/5/75ea60328699793aaae65b719dc5ccb9c0f2ab99.png)

```auto
# Load the Python Standard and DesignScript Libraries
import sys
import clr
import System
clr.AddReference('ProtoGeometry')
import Autodesk.DesignScript.Geometry as DS
from Autodesk.DesignScript.Geometry import *

lib_dxf_path = IN[0]
outDxfpath = IN[1]
lib_dxf_dir_path = System.IO.Path.GetDirectoryName(lib_dxf_path)
sys.path.append(lib_dxf_dir_path)
clr.AddReference('netDxf.netstandard') 
import netDxf
from netDxf import *
from netDxf.Blocks import *            
from netDxf.Collections import *
from netDxf.Entities import *    
from netDxf.Tables import *                

out_solids = []

doc_dxf = DxfDocument()
doc_dxf = netDxf.DxfDocument.Load(outDxfpath)
lstBlk = doc_dxf.Blocks
lstBlkName = [x.Name for x in lstBlk]
lstM_text = doc_dxf.MTexts
lst_text = doc_dxf.Texts
meshs = doc_dxf.Meshes   
for m in meshs:
    faces_indices = m.Faces
    lst_vertices = list(m.Vertexes)
    lst_array_pts = [[lst_vertices[idx] for idx in group ] for group in faces_indices ]
    lst_array_pts = [[DS.Point.ByCoordinates(vect3.X, vect3.Y, vect3.Z) for vect3 in group] for group in lst_array_pts ]
    lst_surface = [DS.Surface.ByPerimeterPoints(groupPts) for groupPts in lst_array_pts]
    ds_solid = DS.Solid.ByJoinedSurfaces(lst_surface)
    out_solids.append(ds_solid)
    
OUT = out_solids

```

> **[netDxf.netstandard 3.0.1](https://www.nuget.org/packages/netDxf.netstandard)**
>
> .net Dxf Reader-Writer
