|
A linked DWG is usually treated as a fixed reference, but Dynamo can read it as a live input instead, and use it to drive Revit family placement directly.
You may know that you can use a DWG to build a native Revit TopoSolid. 'Create from Import' is in the TopoSolid panel in Massing & Site, just select the DWG and choose which layers have the levels. This is nice, but what if you want more? Dynamo can help supercharge your DWG usage. Even a simple graphs like 'select model element' and 'get element geometry' can be a life saver, but usually you'd like a bit more control. Say the DWG is a survey, perhaps you want to make some pipes, you can read the geometry and its layers to isolate what you need... Reading the text from the geometry needs a package (BiMorph has many useful nodes for these tasks) or custom code such as: layer_name = doc.GetElement(geom_obj.GraphicsStyleId).GraphicsStyleCategory.Name Where geom_obj is an item from iterating the ImportInstance's geometry, and doc is the current document. You'll then pass this information through the graph until you make a pipe... pipe = Pipe.Create(doc, system_type_id, pipe_type_id, level_id, start_pt, end_pt) Taking an Object Oriented approach is going to help with all these different pieces of data, so a dictionary or sub-list per pipe is going to keep everything consistent. Pipes are a whole interesting topic for future blogs! Just one thing to note... If you move the start point you also move the end point! So if you need to change the angle of a pipe, you want to set a new location curve, that will update the whole pipe position. pipe.Location.Curve = updatedLine A great aspect of these flows is the ability to re-run the graph to update the families as you need. No more manual drawing. You can also have a follow on comparison graph to show changes and compare before and after.
0 Comments
Leave a Reply. |
AuthorMark is a BIM Expert and qualified UK Architect. He currently works with Reope building digital solutions for built environment. Archives
July 2026
Categories |
RSS Feed