Data attribution using information from a CAD file


#1

Hi all, currently need to populate a parameter using data from a text layer in a DWG file. So far I have linked the cad in for a floor plan and generated the generic models using a dynamo script to create floor separation lines from a cad layer, then kiwi tools to generate a generic model for each room. Just wonder if anyone can think of a way to automatically populate a custom parameter with data from a CAD file.


I had a go with the Bimorph nodes package and got this far:


DWG-Rooms xref -> Space Lines -> Room creation
#2

Can you share a sample cad file which contains the type of objects you’re working with?

I think a dataextraction command in autocad may allow you to get the data you need, but I’m not sure how your file is set up.


#3

Unfortunately text elements within a DWG or DGN are not exposed in the Revit API (and therefore Dynamo), which means there is no way to access them. The only option is to explode them using the standard Revit Explode command, then you can filter these elements using Dynamo. I believe there is a way to do this using the RevitAPIUI, which simply automates the explode command (see link), however its limited to Revits 10000 element limit.

@JacobSmall suggestion is worth pursuing if you are an AutoCAD user.

I’m going to be looking at adding text conversion functionality to BimorphNodes when I find the time as there is another method I am aware of that utilises DXF


Bimorph DWG Import - Bringing over text ( Exploding? )
#4

@Thomas_Mahon
Thomas,

This might be of use. Love to see this in a package.


Marcel
+++++


#5

RoomDataDWG in GenericModelsRevit_working170706.dyn (31.2 KB)
Hi Everyone, thanks for the help so far, just an update. I have imported the dwg containing the room names on top of generic models then exploded the dwg and grabbed the text notes. I’ve managed to create a list that determines whether a point generated from with in the text box intersects with the generic model geometry. L2 of the list refers to each generic model, L1 of the list refers to the particular text item. The trick now is just some list wizadry so that I can use a change element by parameter node to append the specific text with the parameter that I’ve set up in the generic model, each list in L1 should have one boolean true relating to the specific text note . Thanks for all your help so far


#6

Sorry update again, managed to figure out the list myself using an Indexof node with the element set as true;


#7

@julian.venczel

hey julian, would you be so kind and upload your final *.dyn file?
I do need the same solution to add my “rooms” some additional information :slight_smile:


#8

Hi, could you not finalize your workflow with what has been shared already? If so, it would be good practice to simply send a screenshot of your graph showing where it does not work for you: indeed, it would be useful to the community to see how to solve a new issue here, if any.


#9

RoomDataDWG in GenericModelsRevit.dyn (24.7 KB)
That was the final file, it works quite effectively for Generic models, I guess it wouldn’t be too much of a stretch to alter it to work on other kinds of solid geometry and it’s also pretty straight forward to get it to populate other parameters as well.


#10

Hey, I am looking to get a similar task completed.

I have lights in a DWG with a reference in text next to them. Then I have a revit file with plans that look exactly the same with the smae Arch back ground and lights in the same positions.
(Obviously the lights in REVIT are family’s and in CAD they are blocks)

I want to get the reference from CAD into the family parameter. Each light fitting has its own number, and there is around 8000 of them.

Do you think this DYN you have here could help me towards getting this done, or could someone tell me if this is even possible.

Anyone’s help is very much appreciated in advance.


#11

As it’s similar but not the same I suggest creating a new topic and simply putting a link here asking for help.


#12

Hi @lewiskent,

The workflow I used involved isolating the layers with the desired text from the CAD files, (We used a LISP routine to clean out over 200 floor plans but obviously you can just delete the unnecessary layers manually). The DWGs were then brought into revit and exploded to give us text notes, as I mentioned before. As long as the text notes are placed directly underneath the desired family you could text for collision, the trick is filtering out the notes that don’t collide with anything (removing nulls). From there it’s just a matter of replacing the desired parameter with the data from the text notes. Let me know if you need any further direction.

Regards, Julian