ladybug-tools / honeybee-dynamo

:honeybee: :blue_book: Honeybee library and plugin for Dynamo
GNU General Public License v3.0
17 stars 8 forks source link

'NoneType' object has no attribute 'Faces' #61

Open martinromby opened 7 years ago

martinromby commented 7 years ago

Hi everyone,

So I am new to Honeybee and Ladybug, but use Dynamo on a weekly basis. Some months back I gave the Honeybee and Ladybug tools for Dynamo a go, where I got them going (with som minor issues). After seeing @SamDehghani solution on how to Bake Honeybee Daylight Results from Dynamo to Revit I went back to test his solution. But once I run the definition I get this errormessage from the Rooms to HBZones node:

ERROR: 'NoneType' object has no attribute 'Faces'

If you think this is a bug submit an issue on github. https://github.com/ladybug-analysis-tools/honeybee-plus/issues and include below error message:

Traceback (most recent call last):

File "", line 14, in

File "C:\Users\mro\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Honeybee\extra\honeybeex\revit.py", line 279, in convertRoomsToHBZones _elementIds, _coordinates = \

File "C:\Users\mro\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Honeybee\extra\honeybeex\revit.py", line 89, in extractPanelsVertices coordinates = (

File "C:\Users\mro\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Honeybee\extra\honeybeex\revit.py", line 91, in tuple(baseFace.ClosestPointTo(pt) for pt in opening)

File "C:\Users\mro\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Honeybee\extra\honeybeex\revit.py", line 84, in tuple(edge.StartVertex.PointGeometry for edge in loop.CoEdges)

File "C:\Users\mro\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\Honeybee\extra\honeybeex\revit.py", line 80, in _outerFaces = (p.ToProtoType().Faces[1] for obj in _geo

AttributeError: 'NoneType' object has no attribute 'Faces'

2017-06-30_0809

I am using Honeybee 0.1.2 and Dynamo 1.3 in Revit 2018. I am testing the solution on the OOTB rac_basic_sample_project.rvt project.

I hope someone can guide me to a solution.

/Martin

SamDehghani commented 7 years ago

Hi Martin, I sometimes see this message. I try to solve the problem by setting the "boolean" to "false", and re-run the script. Then set it to true Goog luck

martinromby commented 7 years ago

Hi @SamDehghani, Thank you for the very fast reply :) Unfortunatly I'm not able to solve the problem by following your suggestion - still getting the error message. I tried to rebuild the definition from scratch and that still doesnt help. Thanks for sharing the solution - it is a great tool (once its running properly)

/Martin

SamDehghani commented 7 years ago

Hi @martinromby, Have you tried to restart the Dynamo and Revit? The first part of the script belongs to Honeybee package and the problem is menstioned in the samples of the package too. The Revit API doesn't let the programmers to access the room information directly.

mostaphaRoudsari commented 7 years ago

@martinromby see this issue: https://github.com/ladybug-tools/ladybug-dynamo/issues/28#issuecomment-305556002

martinromby commented 7 years ago

Hi' @mostaphaRoudsari Thanks! I wasn't sure that the two were related. Does this mean that every errors I get from the Rooms to HBZones node are related to this? And also, by using the Pick Surface method, does that mean walls and floors or are there more surfaces that needs to be included for a Daylight analysis to complete?

/Martin

mostaphaRoudsari commented 7 years ago

@martinromby,

  1. It means that Rooms to Zone can easily crash unless you get lucky.
  2. You need to include all the geometry that affects the results of your simulation. Here is a good video that shows what needs to be included in your model. In the video geometries are exported to Rhino but you can just convert them to HBSurfaces inside Dynamo and run the daylight analysis.
mostaphaRoudsari commented 6 years ago

@martinromby can you share the Revit model that didn't work with me? I started a new package to address this issue: https://github.com/ladybug-tools/dynosaur

muoso commented 6 years ago

Hi, in order to install dynosaur I need to replace the .py files from the dynosaur folder into the honeybee folder right? I don't know if I did it in the right way since this error pops up: 2017-10-02 2

mostaphaRoudsari commented 6 years ago

@martinromby, It's not as simple as that. I will make the adjustments and upload a new version of honeybee soon. Meanwhile if you can share the Revit file with me I can test it beforehand and make sure it works for your case.

muoso commented 6 years ago

Thanks for the answer, anyway I did the test on the basic architectural example of Revit. So what would be the proper way to install the dynosaur package? Or we should wait for a new honeybee version?

mostaphaRoudsari commented 6 years ago

I just pushed a new version to dynamo package manager. It does a better job in importing room and works fine if you load the rooms one by one. There are some Dynamo hiccups and random errors if you try to import all the rooms all at once.

image

muoso commented 6 years ago

Awesome, thank you very much!

lucianoambrosini commented 6 years ago

Hi everyone, thanks for your effort. I have the same error like russoluca , is it still possible? (or just my fault?) I have Revit 2018.1 and HB package 0.1.5. I have tried also your last solution, but i still getting the error. Revit model is very very simple. Any suggestion?

snipaste_20171115_235211