DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.74k stars 634 forks source link

Floor.ByOutlineTypeAndLevel(outlineCurves,floorType,level) - does not appear to function when called in a code block #4457

Closed buddyd16 closed 9 years ago

buddyd16 commented 9 years ago

The Floor.ByOutlineTypeAndLevel(outlineCurves,floorType,level) node works fine on its own however when attempting to call it in a code block the floors are not created and "null" elements are returned.

I am pretty sure this one is user error on my end but I am not the only one that can't get it to work either.

the forum has an example: http://dynamobim.com/forums/topic/using-a-code-block-function-to-create-floors/

monikaprabhu commented 9 years ago

@buddyd16 - Works for me in latest daily build - Try this, if it still fails please get back to us with more details floor

buddyd16 commented 9 years ago

Here is what I have now the floor call is in an imperative section which loops over multiple levels, floor types, and groups of closed curves. If I pass each level, floor type, and then flatten the curve list it can run thru the floor.byoutline node without issue. I am trying to avoid having to to break out each level individually.

capture

buddyd16 commented 9 years ago

I simplified the variables a bit and here is something odd in the main code block inside the imperative Count(c[0][]) produces a value of 1 but in a standalone code block Count(c[0][]) produce the expected value of 5.

capture_2

buddyd16 commented 9 years ago

I am getting closer my list of curves "c" needed to be declared as a three tier list => c:var[][][] Doing that the floor call produce floors in revit for the initial run of the while loops only. How do I get it to do the other two runs in this case?

capture_2

buddyd16 commented 9 years ago

I got it I needed to reset indd = 0 prior to second while loop.

Is there somewhere that notes how to declare the variables coming into the code block? me figuring out that c:var[] needed to be c:var[][][] was complete luck by trial and error.