CAD Block location


Hi there,

What I’m trying to achive is to get location of some Cad blocks from a Cad file inserted as a link in Revit.

Right now, I’m using an Excel file got from AutoCad and then I use dynamo to insert a family instance by point.

I would like sth without using Excel, because those Cad blocks have geometry parameters with the location, so if I could read them, it’s gonna be faster than create an Excel file and…

I’ve tried with ActiveX package ans DynamoCad package, but nothing works.

Any Idea?



AutoCAD Block to Revit Familie


Have you looked into what you can access via the dataextraction command in AutoCAD?


Using dataextraction I can get what I want. x,y.z geometry and the block name.

I can get that, buy I dont want to do it with an excel file. I want to do it directly from Dynamo.



What type of blocks are they, can you post a copy?


Does the GIF below demonstrate what you want to do?

If so, here is the python script to get the origin of a CAD import.

#Copyright(c) 2018, parallax team
import clr

# Import ToDSType(bool) extension method
import Revit

# Import RevitAPI
import Autodesk

#Custom tolist definition provided by Dimitar Venkov
def tolist(x):
	if hasattr(x,'__iter__'): return x
	else : return [x]

#unwrap all elements to use with API
items = tolist(UnwrapElement(IN[0]))

#lists to append results to
locations = list()

#iterate through the cad imports
for i in items:
	transform = i.GetTotalTransform()

#Assign your output to the OUT variable
OUT = locations


Hi there!

First of all, thks for your answers.

Find attached a capture of the cad file:

As you can see, there are some blocks in the same cad. They are some ligthing fixture, each block has a geometry with the location, so, I just need to read them in order to set my objects in Revit.

I would need to know the location of blocks inside the Cad file instead of the origin of a cad file.

I would need to find for each block named “blablabla” the location “XYZ”.

Thks again



I have the same issue with active x the file package :frowning:


Don’t know why, but sometimes works, sometimes doesn’t.



while run the dyn you should open the related autocad file…