I have linked dwg file in my Level 1 view. Its only visible in this view. I want to get its layers, curves etc. and use them to create floors. I have tried to select it using “Graphical Element” but it gets it location i believe. I have tried importing CAD file into Rhino directly but aligning it becomes a hassle. Any idea how can i get linked DWGs with layer names and geometries into Grasshopper?
I have attached a sample Revit 2021 file. DWG is also attached. Linked DWG.rvt (5.1 MB)
Any help is appreciated.
Revit API does not have anything specific to pull DWG information from imports.
Workaround 1
See the Grasshopper definition attached. This definition has a set of custom python components that grab the geometry from the imported DWG element (DB.ImportInstance)
The extracted lines returned by Revit API as geometry, have a DB.GraphicsStyle applied to them. This style has some of the info about the layer that the line was extracted from
We can use this information to bake the lines in specific layers in Rhino. For this I’m using the Bake component from LunchBox GH addon, but other similar solutions are available in Elefront, Human, and Pancake I believe.
The same grasshoppe definition above, shows a method to extract the path of the linked DWG file. This can be imported in Rhino and processed. I believe Pancake addon can help here.