# How to Get data from autocad block into revit family as shown on below img

**URL:** <https://forum.dynamobim.com/t/how-to-get-data-from-autocad-block-into-revit-family-as-shown-on-below-img/92508>\
**Category:** Revit\
**Tags:** revit, python, geometry, dynamo\
**Created:** [August 3, 2023, 6:05pm UTC](https://forum.dynamobim.com/t/how-to-get-data-from-autocad-block-into-revit-family-as-shown-on-below-img/92508 "2023-08-03T18:05:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas.kpoojary](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikas.kpoojary/32/178920_2.png) [@vikas.kpoojary](https://forum.dynamobim.com/u/vikas.kpoojary)\
**Post date:** [August 3, 2023, 6:05pm UTC](https://forum.dynamobim.com/t/how-to-get-data-from-autocad-block-into-revit-family-as-shown-on-below-img/92508/1 "2023-08-03T18:05:51Z")

</div>

![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/7/c7bf0acfa5d487e2173d51c9183c8e92ae738d93.png)

for placing blocks [Aussie BIM Guru - YouTube](https://www.youtube.com/@AussieBIMGuru/about) this video helped me, @AussieBIMGuru Thankyou .

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [August 4, 2023, 6:43am UTC](https://forum.dynamobim.com/t/how-to-get-data-from-autocad-block-into-revit-family-as-shown-on-below-img/92508/2 "2023-08-04T06:43:27Z")

</div>

@vikas.kpoojary ,

i am not sure , but check out GeniusLoci package!

> **[GitHub - albandechasteigner/GeniusLociForDynamo: Genius Loci is a package of...](https://github.com/albandechasteigner/GeniusLociForDynamo)**
>
> Genius Loci is a package of 350+ custom nodes for Dynamo in Revit. - GitHub - albandechasteigner/GeniusLociForDynamo: Genius Loci is a package of 350+ custom nodes for Dynamo in Revit.

KR

Andreas

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [August 7, 2023, 3:56am UTC](https://forum.dynamobim.com/t/how-to-get-data-from-autocad-block-into-revit-family-as-shown-on-below-img/92508/3 "2023-08-07T03:56:26Z")

</div>

There is the LinkDWG2 package for Dynamo which may be able to assist - Aussie BIM Guru has a video on how to use this [link](https://www.youtube.com/watch?v=z7gbkREdzEM). Unfortunately I believe this requires an active AutoCAD application to be running in the background.

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [August 7, 2023, 4:32am UTC](https://forum.dynamobim.com/t/how-to-get-data-from-autocad-block-into-revit-family-as-shown-on-below-img/92508/4 "2023-08-07T04:32:55Z")

</div>

I can confirm it does, and I believe it may not work in all cases. As far as i know this is the only method available that isnt commercially sold. The nodes are all in Python so you could learn from it and adjust to suit potentially.

As an alternative consider developing a workflow around the Dataextract command and look into Bird tools who have an app for doing what I do at scale with block to family mapping.

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [August 8, 2023, 12:19am UTC](https://forum.dynamobim.com/t/how-to-get-data-from-autocad-block-into-revit-family-as-shown-on-below-img/92508/5 "2023-08-08T00:19:56Z")

</div>

You can access the AutoCAD api from Revit and side load the DWG.  
Below is a minimal example.

I suggest looking at Kean Walmsley’s blog [Through the Interface](https://through-the-interface.typepad.com/) for solutions. Most of the examples are in C# however you can parse the Python equivalent (perhaps even use ChatGPT?)

See also [AutoCAD API .NET documentation](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-C3F3C736-40CF-44A0-9210-55F6A939B6F2)

```auto
import clr
from System.IO import FileShare

clr.AddReference("AcDbMgd")
from Autodesk.AutoCAD.DatabaseServices import *

dwglink = IN[0]

with Database(False, True) as db:
    db.ReadDwgFile(dwglink, FileShare.ReadWrite, False, "")
    with db.TransactionManager.StartTransaction() as t:
        blocktable = db.BlockTableId.GetObject(OpenMode.ForRead)
        output = [btr.GetObject(OpenMode.ForRead).Name for btr in blocktable]
        # Do more stuff here
        t.Commit()
OUT = output
```
