Basic stuff again

#1

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

0 Likes

#2

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

#3

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

#4

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

0 Likes

#5

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:

0 Likes

#6

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

0 Likes

#7

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

0 Likes

#8

Look in the API :
https://apidocs.co/apps/revit/2019/20ab2f32-e3ca-8173-aac3-a03e998fd0ab.htm

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

1 Like

closed #9
0 Likes