Use AutoCAD to drive floor objects

Hi - I am facing a (rather) weird issue.
My intent is to create a basic set of floors such that the outline (which is in flux) can be quickly changed from CAD to BIM. So there will a bunch of CAD files; linked into the Revit model at corresponding levels and one dedicated CAD Layer which will input the curves for the floor slabs. Thus the placement level of the “import instance” would be the level in which the floor would get created. All this works when using the “Select Model element” for picking the Import Instance.

But when using the All Elements of Type as Import Instance, I get “Null”
Any ideas / suggestions as to what is wrong or how to make it better?
Convert CAD Outlines to Floor Slabs.dyn (12.2 KB)
Floor 1.dwg (37.4 KB)
Floor 2.dwg (37.5 KB)

Also, passing a List of import instances to extract from CAD doesn’t output curves; Can you please help explain why this happens?

It might be the fact that importInstances wrapped in the Dynamo Revit.Element class are “UnknownElements”. Its been reported on the GitHub.

I’ve also looked at your DWGs and the level name you are inputting doesn’t exist in these files, hence you wont get any curves!

Hi @Thomas_Mahon
Thanks for the quick reply

Does that mean it would be resolved later?

Actually the screenshot was from the earlier version - My bad!

Can you please take a look at the DYN file and the CAD?
The level information can’t be wrong as I’m using the element.level of the CAD import instance itself. So trust you were referring to the Layer name being input for extracting the curves. To clarify, The layer name being input is “Floor” & both the CAD files have one polyline each on a layer of that name.

I meant layer name! To reiterate, in your DWGs there are two layers. Floor is the only layer in use, hence to extract the curves using CurvesFromCADLayers you need to input "Floor" via the codeBlock. Entering "215 Curtain Wall" will return null since this layer doesn’t exist in either CAD file. Alternatively, you can leave this input empty and the node will convert all curves on each layer.

Hi @Thomas_Mahon
Thank u for sparing time to import the files & help out.
Yes - I understood what you meant and reached the same state as your screenshot (the DYN had the correct input of “Floor” with the Curve extraction working).

Guess the Import Instances being “UnknownElements” is the reason why any curves can’t be extracted when inputting thru “Element Types” & “All elements of Type”…
Is there any other way I can input “Import Instance” without using “Select Model element”?

Hi @Chandrasekar_Rajaman

Use Element types node.

Hi @Kulkul

Thanks for that - I tried that (as is visible in the screenshot) but for some reason, it throws a null when trying to extract the Curves from the CAD file…! Can you please take a look at the CAD & DYN files uploaded before?

@Chandrasekar_Rajaman Sure, I have a look later today.

Hi @Chandrasekar_Rajaman

It is working as expected. There are couple of inputs you missed.

And here is the file Convert CAD Outlines to Floor Slabs(For Chadrashekhar).dyn (15.3 KB)

1 Like

Hi @Kulkul
Thank u for the reply & apologies for the delay in getting back

If u look at Post#5, what I wanted to highlight is that if I select by Model element, the conversion works!
But if I use All elements of Type, it returns Null.

To clarify, this is a test file with 2 polylines. Actual is going to be 30+ polylines; in which case, selecting the import instances by using Model elements doesn’t appear an elegant way of doing it… So query is-Any other way possible?

Many Thanks once again.

You might checkout Flux as well. They’re working on an AutoCAD plugin.

@Chandrasekar_Rajaman Change lacing to longest.

1 Like

Hi @Kulkul
Thanks a lot! Will check & let u know :slight_smile:

Never imagined Lacing would be the issue here!
Many Thanks once again !!


I am also testing the workflow and managed to get it to work by flattening list and grouping the curves.

Hi all,
When I recreate this def it is giving errors. I’ve created a basic square in Autocad, imported the file into Revit, and ran this definition as a singular file. When this gets all wired up the program hangs and appears to go though an infinite loop. What am I doing wrong? I should also note that I have updated the newest version of Bimorphs but still getting the same ‘hang’

Drawing1.dwg (38.4 KB)

6 posts were split to a new topic: Drive floor objects from CAD using Bimorph package

You are not providing the Floor.ByOutlineTypeAndLevel with the required type (curves instead of a closed poly line…which incidentally is likely to be causing the crash) and the lacing level of the PolyCurve.ByJoinedCurves is set to the wrong depth; it should be @L2 not @L1 in your case.

Also, run Dynamo in Manual mode, not Automatic when creating Revit Elements as circular dependencies sometimes occur due to the way the programs interop, and this also leads to crashes.

1 Like

Hi All,
Can any any one help me in this issue


Welcome to the forum!
You need to select a level.

You can use the node Levels and select the right level.

thanks for your quick reply