andydandy74 / ClockworkForDynamo

A collection of 450+ custom nodes for the Dynamo visual programming environment
MIT License
219 stars 96 forks source link

Place Unplaced Room #22

Closed andydandy74 closed 9 years ago

andydandy74 commented 9 years ago

need that node!

ksobon commented 9 years ago

Mhmmm there is this method in Revit API: Document.NewRoom (Room, PlanCircuit).

Honestly I have never used a Plan Circuit class but it seems like its an enumerable object. The only question is how will i know which plan circuit is which area exactly. We might need to devise a method for checking if such circuit contains a point. Using a point and an existing unplaced room would be best for user experience. This seems like it will be an issue because Circuit class doesnt have any geometrical properties. It doesnt have boundaries or anything like that. It might have to be something like this:

get all circuits for circuit in circuits: place room into this circuit retrieve new room bounding box check if points is contained within if true commit else: rollback

Ideas?

andydandy74 commented 9 years ago

Actually I want to place unbounded rooms. A friend has 1000+ rooms in a project that were imported from Excel and placing them via the room dropdown in the Revit UI is not feasable as it involves too much scrolling. Now he just wants to place them in a grid next to the building on their respective levels with some tags so the users can just drag them to the correct locations. We may end up either removing all unplaced rooms and placing them directly from Excel or collect all unplaced rooms, gather their respective attributes, delete them all and place new rooms using Julien's node. And I must confess I had never heard of plan circuits before today.

jbenoit44 commented 9 years ago

I did use plan circuit once. Let me have a quick look.

Julien BENOIT

Le 12 mars 2015 à 15:27, Andreas Dieckmann notifications@github.com a écrit :

Actually I want to place unbounded rooms. A friend has 1000+ rooms i a project that were imported from Excel and placing them via the room dropdown in the Revit UI is not feasable as it involves too much scrolling. Now he just wants to place them in a grid next to the building on their respective levels with some tags so the users can just drag them to the correct locations. We may end up either removing all unplaced rooms and placing them directly from Excel or collect all unplaced rooms, gather their respective attributes, delete them all and place new rooms using Julien's node. And I must confess I had never heard of plan circuits before today.

— Reply to this email directly or view it on GitHub.

jbenoit44 commented 9 years ago

I check an have a node that creates rooms for each Plancircuit. Plancircuit is a topology in a level than can host a room. If you want to create unbounded rooms, it must be done with method NewRoom(level,UV) if I remember well. UV is a place on a grid. Plancircuit could be useful but as Konrad said not sure we can get location or geometry from it.

Julien BENOIT

Le 12 mars 2015 à 15:27, Andreas Dieckmann notifications@github.com a écrit :

Actually I want to place unbounded rooms. A friend has 1000+ rooms i a project that were imported from Excel and placing them via the room dropdown in the Revit UI is not feasable as it involves too much scrolling. Now he just wants to place them in a grid next to the building on their respective levels with some tags so the users can just drag them to the correct locations. We may end up either removing all unplaced rooms and placing them directly from Excel or collect all unplaced rooms, gather their respective attributes, delete them all and place new rooms using Julien's node. And I must confess I had never heard of plan circuits before today.

— Reply to this email directly or view it on GitHub.

ksobon commented 9 years ago

Andreas, your friend will have to back up a little bit. Create rooms from excel with method that julien mentioned. The gist of it is that you will create a new room with juliens advice so then capture it and assign name/properties from excel. Should be easy.

jbenoit44 commented 9 years ago

PC has Area property. Could be use to check program and create room type accordingly. Or one can create rooms to PC, collect room location, and use this to place rooms from outside.

Thoughts?

Julien BENOIT

Le 12 mars 2015 à 15:27, Andreas Dieckmann notifications@github.com a écrit :

Actually I want to place unbounded rooms. A friend has 1000+ rooms i a project that were imported from Excel and placing them via the room dropdown in the Revit UI is not feasable as it involves too much scrolling. Now he just wants to place them in a grid next to the building on their respective levels with some tags so the users can just drag them to the correct locations. We may end up either removing all unplaced rooms and placing them directly from Excel or collect all unplaced rooms, gather their respective attributes, delete them all and place new rooms using Julien's node. And I must confess I had never heard of plan circuits before today.

— Reply to this email directly or view it on GitHub.

andydandy74 commented 9 years ago

I always find it very frustrating when functionality that is available in the UI isn't exposed in the API. They've added a lot of stuff in recent years but there's still lots of functionality we can't use programmatically. In this specific project some rooms have been placed already, so we can't start from scratch with a full Excel import. So it's probably going to be deleting all unplaced rooms and then doing a filtered import of only those rooms that aren't present in the project yet. I would have liked to re-use the rooms that are already present in the model (no new IDs), but since the rooms haven't been placed yet there's no harm in deleting them anyway. Thanks for your thoughts, guys.