i have now tried to setup a script like yours - but i have some problems getting it to work.
i switch to the dynamo window - presses ‘Select’, goes back to revit, and then i select the imported dwg - but i then get the error “Warning: Internal error, please report: Dereferencing a non-pointer.” in the Element.Geometry.
if i then explode the dwg, and use select again - i can only select one line at a time - and this gives me the error “Warning: FilledRegion.ByCurves operation failed.
Curves do not form a closed loop.” in the FilledRegion.ByCurves.
Does the “Autodesk.DesignScript.Geometry.Polycurve”; code block require any addons?
I’m sure i’m doing something wrong - but i don’t know what :-/