Importing text from CAD to REVIT

Hello I’m a beginner when it comes to dynamo and scripts as a whole so apologise if this is a simple ask !

I’m using a script that was developed in order to import CAD lines into a REVIT format but I’m wondering if there is a way to bring text associated with it across aswell ive done some digging and apparently the code to select text from CAD is (ssget “_X” '((0.“TEXT”))) and then in order to make it layer dependant I need to add (ssget “_X” '((0.“TEXT”) (8.“Mylayer”))) But everytime I create this block it gives me a closeparren Expected error.


Any help would be appreciated !


Unfortunately I’m not sure this is possible without exploding your CAD in Revit…

Here’s a link to help you with design script (the language of code blocks)

Hope that’s of interest,


Actually, I am pretty sure you could use the AutoCAD api to pull the data that way. No publicly available package I know of exposes it, but you could look at the LinkDWG package for other element types and decipher where to go from there.

Hey, good shout… This is in LinkDWG… It backgrounds opens the CAD file… any suggestions on casting a System._ComObject to a Text Element or reading it’s information?! :smiley:

Edit: It looks like the Python contains the code that the OP was trying to use…

Hi thanks for all the information provided ! ill have a bit more of a play around today with this new stuff and see what happens ! Anything else that may help would be much appreciated aswell !

A bit more digging around in the Link Dwg package got this…

Hope that helps,



Hi Mark, The Manage.RemoveNulls Node what package is that from ? cant seem to find it on LinkDWG

Hi Harry,

I’m not sure which packages you have (I’d recommend getting the top 10/15… also Orchid

There are many nodes for getting rid of nulls, that one happens to be from Lunchbox :slight_smile:



Could also try a data extraction.

Yes it is possible, I was looking at your node…
I manage to get all the text from Cad to Text note … thank you

Hi Did this bring the text from CAD to revit ?

It would recreate the text in Revit? Taking it’s text and location and making a new note for each… If that’s what you’re asking? :slight_smile:

To bring it in (as I’m sure you know) you could import and explode the CAD, but that also brings lots of problems…

Is it possible to delete layers of an imported cad and then explode through api? If it is, then it would technically be possible to delete all layers except the ones you need, explode, find all text notes with their text and position, then undo the explode and delete.



(BimorphNodes v3.0 ETA March/April). It avoids explode too, since there is a risk of hitting the 10000 element limit, so it uses an alternative route to only target the MTEXT and TEXT objects in the file.


Oooh awesome. Will it work for Revit 2017/18? And will layer filtering be available as it was for curves?

Yes to both. The above is beta, there will be an input for layers.


Any chance you could briefly give the process or outline on how you do it? :grin:

Yeah sure, I’m using netDXF library, so the process involves exporting the import instance to DXF, parsing with the netDXF library then converting the text objects to strings and origins to Dynamo points.


Any updates on this node? I am in the middle of a large transfer or room names/numbers where I’d like to try this out.

Hey Steve,

You can use the graph I showed in post 5…

Hope that’s useful,


1 Like