Loft order


Im relatively new to the dynamo world but I think it may be able to help with a reoccurring revit issue. here’s the problem:

Whenever I am working in a conceptual mass, at some point I need to “create form” between a number of profiles to produce some sort of surface. The problem is that Revit does not allow you to dictate the order of the loft… it does some sort of background calculation to determine the ordering of profiles…









The attached images illustrate the problem. I used 3 lines as a an example… simply using “create form” to loft between them. It gives two different shapes depending on… something. It is that something that I do not know.









The first shape.









The alternate shape.

So, I tried to use to dynamo thinking it would be able to “order” profile loft.





I simply indexed the curves and used a loft node to create shape… and now I have different shapes. I tried switching the order of the curves in the list, but no consistent pattern emerges.


I am assuming there is a function built in to Dynamo to help with this problem. Any suggestions?


I don’t know in 0.6.3, but in 0.7.0 “Surface.ByLoft” will take just the order of the profiles in the list


Thanks, Ill give 7.0 a try and see if it works


The order in which you input the curves for the loft tool does affect the outcome in 0.6.3, but it looks like there is an issue with updating the form after it has been initially created.





When making a lofted form manually in Revit, pick order is not taken into consideration, rather, a “shortest path” calculation is made.



I agree I too have used the loft order and it is amazing!

Thanks Dynamo!

Is profile order even possible if you were to just code with the Revit API using .net?



Yes, just doing regular Revit API you can control profile order. The trick is the limitation of Revit’s selection editor in the UI, which throws out pick order.


Thanks guys, this has solved quite a few problems in my current project.

One further thought… the example Zach used was similar to my own experiment, selecting individual elements and plugging them each into a list. Is there a way to use the “select elements” (multiple) node to grab all of the curves and then dictate the loft order by some sort of xyz coordinate tied to the curves? I would rather not make 100 nodes to grab each curve, it seems messy.


Are you using 0.7.0? If so, probably it will be easy to sort the list with some DS code. Can you explain a bit the order logic in your case?




If the profiles are in planes parallel to the main references planes it will be very simple to sort. Just take one point of every profile and sort by X, Y or Z coordinate.

More interesting will be if they are not in parallel planes. Or not related to the main reference planes. One general possible solution is to have a auxiliar line that is driving the order. This is a fast and simple try with a DS function:

def OrderProfiles(Profiles1:Curve[],CRef)


It is taking the (parametric) middle point of every profile. And finding the (parametric) position of its proyection in the aux line, that is driving the sorting.

For profiles in parallel planes, any line perpendicular to the planes will make the job.






For profiles in a bit more complex relative position, just draw a spline that follow the order you want. It is no needed that the spline touch the profiles or follow them accurately. Just close enough for taking the correct order.






If you want to try it, just copy the code in a code block, and call the function in any other (like it is showed in the screenshots). I suppose that sooner than later functions will work inside custom nodes (last time I checked they didnt work). So it will be a litte bit more convenien to use and share with others.