Help with basic function

Why is list.last item not working inside a function?

Yep you got the last item!

Whats wrong there?

Think the issue is with the definition made in codeblock called “name” is not returning the same as the ootb node.

in my head the function “name” should give that last item?

Point.ByCoordinates Output and name(x) Output both are same.

Point name is not define in Revit.

have the same result…and because of that i use python often…its easyer

1 Like

you need to define the structure of your x variable



This is a good post by @colin.mccrone


To expand on what salvatoredragotta30m said.
(Though I’m kinda guessing )

Your function is doing nothing wrong, it’s giving you the last item of the item you entered.
But you’re passing in a LIST of points. I suppose the code block automatically starts lacing your function over every individual item.
So it’s not getting your list’s last item. It’s asking every point for its “last item”.

And because you’re asking the “last item” of a single point every time, you’ll ofcourse be getting that exact same point back.
Dynamo then puts it in a list and pumps it out.

That’s what the var[] is for. It tells dynamo that you want to handle t1 as a list, and not every single item.


@robert.ek .Please mark the topic as solved

Thanks for the help

1 Like

I think we should pin this blog entry :wink:

1 Like

it should be added to the dynamo primer :grinning: