Numbering Elements in Revit with User Interface

Hello everybody,

For my first Dynamo routine, I tried to add an User Interface to a Numbering Routine with a Spline.
This routine can be found here : http://dynamobim.org/forums/topic/renumbering-piles-with-spline-model-line/

I modified this routine for numbering doors for example. In the first try, without User Interface, everything is functional.
When I add User Interface (with data-shapes package), I have some problem in the routine.

Could you help me to resolve those errors ?

(If it’s possible to speak French here, It will be easier for me to understand the difficulty I’m facing)

Thanks

Without Interface:
Numéroter une catégorie complète, à partir d’une courbe sécante (paramètre au choix).dyn (21.4 KB)

With Interface :
Numéroter avec INTERFACE.dyn (43.8 KB)

Don’t speak french but I can try to help you out.

When you switched to the UI version you changed a CurveElement.Curve node to Element.Curves node.

CurveElement.Curve outputs a single curve.
Element.Curves outputs a list of curves (even if it’s only a single curve). The first set of list mapping only runs against the first part of the list - and since none of the bounding boxes contained the first point, nothing was included.

Either change back to the Curve.Element.Curve node as in the screenshot below, or add a flatten node after the Element.Curves node (or before the list.map for the bounding box contains) and you’ll be all set.

In fact, when I called UI blocks from data-shapes packages, It took me time to understand how to get the User Values out from the Form and which type of value I will get.

I’m not sure the Code block with x[0];x[1];x[2]… is the best way to get values out of the Form in this case but it’s effective…

Thank you very much for your help !

Its not a bad method in fact it’s how I use it, but my code block calls additional functions to increase overall speed (that X[0] is feeding into another item that can be called in the same code block as the x[0]).

Also please mark the post as solved if you’re all set. Keeps the forum tidy. :slight_smile: