Single element list python

Hi guys,

Im learning Python in Dynamo and my first task is to get the UniqueId from selected elements in Revit. Quiet easy task, but Ive found some inconvenience, see the attached images. If I want to have one input, which can select one or more elements, I have to prepare a condition, which will iterate over a list or just, return the UniqueId from one element. That is my goal but Ive made somewhere a mistake probably, if the algorithm want to iterate over a list of elements and get the UniqueId from them it returns me a warning that list[object] has no attribute UniqueId. I think this is very common task when using Python and somebody will immediately see this mistake. Can you please help me? Ill appreciate any small advice.

image1846×1080 92.3 KB

image1846×1080 87.4 KB

Video liên quan

Chủ Đề