Filter rule value is 0.000 (zero)

Hi.

I’m trying to automate filter creating process with Dynamo.
It seems a simple task to me, but, as usual, something wrong happens.

I need to create two filter rule, in order to highlight generic model which parameter value (x) is set between values N1 and N2:

x > N1 AND x<=N2

Here is the graph, with N1=1 and N2=2:

So the view filter is created as expected, but value N1 and N2 are set to 0.000.

I tried also setting N1 and N2 to other values, but nothing changes.

How can I solve this annoing issue?

Thanks.

Any idea guys?

One idea is that you’re feeding “Integers” where it might require floats/doubles?
image

Thanks Jonathan!!! Nothing easier!

So, in code block we obtain:
2 --> Integer
2.0 --> Double

But in “number block”, if the number has no decimal places, we always obtain integer…ok!

"Keep calm and use code block" :sweat_smile:

Exactly :slight_smile:

2 Likes

Hi,

I have same issue with Dynamo 2.1 & R2020.

See below screenshots of my issue.
In the first case, the input value is a double --> filter value is 0
In the 2nd case, the input value is an Int64, and nothing is happened…

From my point of view, i would like to get an Int32 but it doesn’t seem possible in Dynamo 2.1.
I don’t have this issue with R2019 & Dynamo 1.3.

Anyone have an idea ?
Thanks !

Sorry, here my 2nd picture…

Try to replace the code block, where you write “Greather”, with the “Select Rule Type” node.

image

Hi,
Thank you for your answer but it doesn’t work for me…
It’s always the same result. I am looking for a long time in google but i have found nothing about that…

Hi,
I was having this same error. Try to change your parameter storage type to double instead of integer and then change your codeblock to give doubles. It worked for me.