Selection/sorting of elements in a specific order

Bonjour,
Je souhaite récupérer des textes durs saisi à la main dans revit, afin de les réinjecter dans des paramètres partagés.
J’ai déjà fait un script pour, mais il sélectionne lesdits textes de façon aléatoire et désordonnée…
Pouvez-vous me proposer une solution qui me permette de définir l’ordre de sélection ?

Et aussi je voudrais savoir s’il est possible de faire un filtre du genre “contient…xxx” via un noeud dans le script ?

Tri

Merci d’avance

Translated by a moderator :
I want to recover the text notes in Revit, in order to reinject them into shared parameters.
I already made a graph for it, but it selects the texts randomly and haphazardly…
Could you suggest a solution that allows me to define the selection order?

And also I would like to know if it is possible to make a filter like “content…xxx” via a node in the graph ?

thanks

hello, there is nothing random or disordered (the order is I think the history of creation)

here is an example of filtration if it helps you

cordially
christian.stan

Bonjour à vous,
Un grand Merci pour votre éclairage sur un langage un peu complexe pour moi qui ne connait pas la programmation, en autodidacte je fais des recherches sur le sujet et j’essaye d’adapter à mon cas.

J’ai rajouté des filtres mais j’obtient un message d’erreur que j’avais pas avant, Dynamo m’indique que “Le type de stockage du paramètre n’est pas un élément.”
Est-ce que cela vous dis quelque chose?
D’avance Merci pour vos suggestions

Translated by a moderator:
Hello to you,
A big thank you for your insight into a language that is a bit complex for me as I don’t know programming. I am self-taught and do research on the subject and try to adapt it to my case.

I added filters but I get an error message that I didn’t have before, Dynamo tells me that “The storage type of the parameter is not an element.”
Does this mean anything to you?
Thank you in advance for your suggestions

1 Like

Please make sure you’re making all posts or responses in English or providing a translation. English is the official language of the forums in order to make searching consistent and accurate.

The error means you’re providing an element as a parameter value for a parameter that does not accept elements. This is because you’re filtering the element based on the text content instead of filtering and providing the actual text.

3 Likes

You’re right, thank you for your comment.
I’ll do it next time
Thank you !

I redid it by adding a knot and the sorting works well.

The only problem still unresolved is the selection order. If it’s linked to the order in which the elements are created, is it possible to change it via a node?

Thanks again for your answers

You can’t really “change” it, you just have to setup the sorting you want. In this case, you need to identify how the light fixture is associated with he text note. Then you can sort/group both lists to match.

Try doing some more research in the forum. There are a ton of similar topics on how to sort/group lists based on matching identifiers.

yes no connection here between element/textnode, i guees the only one could be with distance and group them…but will never be 100 safe…its best use tags.