Hatch all imported building?

Hi

I Wonder if there is a script that let me select all the rectangels in view and generate a hatch?

i ask, because i import a dwg - file that contiains a lot of houses, and i need to be able to color them in revit - but selecting every single line would take me forever :frowning:

jorgensen


Something like this? Tested it only on a clean and brand new dwg

1 Like

hi gregx

sorry for my late relpy - been on holiday, back now but i simply can’t get dynamo to work with revit 2017.

i remember that i normally find dynamo under add-ins - but no nada :frowning2:

i will try to ask in a other thread.

Jorgensen

Ahhh - it has moved to manage… doh…

Jorgensen

hi gregx

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 :-/

thanks
jorgensen

Does your script run automatically or manually? Try setting it manually and running it connecting one node at a time. However it could be the dwg’s fault…