Basic stuff again

Hello Dynos,

I think this is easy for everybody:easy.dyn (2.1 KB)

I have numbers, i would like to filter them for example all my “6” numbers or “2” numbers, in my watch block,
is here the for-loop usefull?

I have realy no clue, thank you for any advice

Kind regards

Andreas

Hi @Draxl_Andreas,

I’m not sure I understood properly.
You can do it with dynamo nodes without python.

items = IN[0]
filter = IN[1]
numbers = []

for i in items:
	if filter == i:
		numbers.append(i)
	else:
		continue

OUT = numbers 

2 Likes

Or the node method:
An == node, and a List.FilterByBoolMask node.

Or a code block method:

List.Clean( item == target? item: null, false);

2 Likes

2018-10-18_10h08_22
I try find a analogie to this - look at pic

I try to force me more to use python, because i can comprimise all my scripts… and it is an excerce! Realy thank you very much, this is for me a small step in a marathon :slight_smile:

I see it is also works without else: continue working!

How about the command .mirrored - I did not find this command in any dictionary? Where are the vocabulary? in Revitdocs? or Dynamo diconary?

How can i find them - i mean exactly the syntex… and how can i put it?

script

Look in the API :

Please start a new topic for a new question. This message has nothing to do with your first post.

1 Like