i have two seperate workspaces i would like to combine in to one, but i need to make one run before the other one.
I’ve gone through every discussions on the forum about th topic, and what i got from them was i need to use the “Transaction.End” With “Function.Compose”
where the “Function.Compose” decides in which order the transactions will run in, maybe im wrong about that?
So what i have is a function that makes floors from the room bounderies, and a function that makes openings in that floor where there is columns.
Therefore i need to make the function that creates the floors run, before the one that makes the openings.
(See attached pic.)
When i run the script i get a “null” value in the opening node, probably because the floors are not yet create and there for it has nothing to make the opening in. i’m i doing something wrong with the “Transaction.End” and “Function.Compose”? or am just not getting how they work?
Anyone who can help?
Any advice would be highly appreciated!
The “Function.Compose” is a bit special because it specifically expects a function object. (shown as a _SingleFunctionObject in Dynamo)
To get those , you must have some “incomplete” nodes( i.e. leave some of the inputs blank).
Right now you’re inputting floor elements into it and that’s making it misbehave.
Luckily for your current work flow, the “Function.Compose” node can most likely be skipped. Instead try to connect the output of the “Transaction.End” node that contains the floor elements straight into the “List.OfRepeatedItems” node and see if that produces the desired outcome.
Each node has to wait for its input to be executed, before it can begin processing it. Therefore the “HostedFloorOpening.ByCurves” will have to wait for the “List.OfRepeatedItems” to finish, which in turn will have to wait for the floors to be created first.
Thank you for the reply!
Althoug want you are saying makes alot of sense to me, i cant get i to make the openings!
am i not getting it right?
Most likely the node is failing because you’re trying to create a floor opening outside of the bounds of the floor element. Usually when you try to do that inside Revit, you’ll get an error similar to this:
The node isn’t capable of handling these failure messages and the transaction gets interrupted. It’s probably possible to build that functionality into the node, but I think it will be much easier to just check for intersections inside of Dynamo with “Geometry.DoesIntersect” and then build the lists based on that.
So i found a way to get it working!
It seems like the node “HostedFloorOpening.ByCurves” cant handel multiple floor types at once.
Thanks for the help Dimitar!
Glad it worked for you. I don’t think it was the floor types that affected it tho, it was probably a list management issue. The node is quite basic and it’s very easy to create a miss-match between the host floors and the opening boundary curves. Unfortunately the node was created for a very specialized work flow and is not easy to adapt to alternatives.
When I mentioned checking for intersections, I had something more like this in mind:
I have a suspicion that by not checking for intersections and properly filtering and matching the floor/opening boundary pairs, you might end up with a few stranded openings lying around. The above work flow should avoid such cases:
I uploaded a new version to the package manager that should be a little bit more robust. It will append an empty list if a floor/opening boundary pair fails.
I’ve also added a new node in the package called “Shaft.ByOutlineLevels” that attempts to creates a shaft opening which does not require any hosts, thus we can avoid complicated filters and matches. It might be more suitable for your particular task:
You can further adjust the shafts’ Base and Top offsets with “Element.SetParameterByName”, however the API demands that the top level is always above the base level.
Dimitar thank you for the awsome reply! and sorry for the LATE answer.
You were ofcourse right, when i tried the workflow on a project with more rooms, it failed!
I went over your exampel (About a 1000 times) to figure out what it was doing
I finally got i working, but for some reason i get a null in my “List.Combine” were i’m combining the floors that have intersecting columns with the number of columns
Mabye you have an idea of what is happening cause i can’t figure it out at all!!