Conditional odd / even parameters associate with Lenght parameters

Conditional odd / even parameters associate with Lenght parameters

strange4ride
Participant Participant
876 Views
9 Replies
Message 1 of 10

Conditional odd / even parameters associate with Lenght parameters

strange4ride
Participant
Participant

Good Evening, so my task is this one, i have a whole number parameter, and every time this whole number be odd, i want de lenghth parameter associated be "X" value, and every time be even, the length value is zero or an infinitesimal number, ive alrealdy made even and odd parameters, anda until now these lines were constructed

 

Parameter = X

Even = rounddown(Parameter/ 2) = roundup(Parameter / 2)

Odd = not([Even])

Length 3 = Length / Lenght 3

 

Now, the is a way to associate the (odd) to (Lenght 3) in a way that every time the odd parameter is activated length 3 is = the equation presented and every time is not (Odd) Length 3 is = 0?

 

If i dididnt manage to provide a great clarification, please be welcome to say that i try to contextualize better, thanks for the attention

0 Likes
Accepted solutions (1)
877 Views
9 Replies
Replies (9)
Message 2 of 10

strange4ride
Participant
Participant
A Quick correction, the length 3 parameter is...
Length 3 = Length / Length 2
0 Likes
Message 3 of 10

barthbradley
Consultant
Consultant

Hard to understand. Are you doing this in an itemized schedule with Calculated Parameters? That might explain a few things.  

 

Got any screenshots?  

0 Likes
Message 4 of 10

Alfredo_Medina
Mentor
Mentor

Your question is not clear. Do you have a way to know if a number is odd or even? The way that you describe above, is that a formula that works, or are you just describing how it should work?

When you write: Even = rounddown(Parameter/ 2) = roundup(Parameter / 2)

What kind of parameter is Even? What kind or formula is that with two equal symbols?


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 5 of 10

strange4ride
Participant
Participant

Há yeah, its for a parametric family that i am programing, an generic model, an wardrobe, with pairs of dors, but i want to program a way tô show a lonely odd dor in the end If i wish on the project, Ive already made It before with other methods, but i looking for a way tô make It better

0 Likes
Message 6 of 10

Alfredo_Medina
Mentor
Mentor

ok, now I have a better understanding of what you're doing. The first part is like this:

 

Alfredo_Medina_0-1700079134292.png

 


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Message 7 of 10

strange4ride
Participant
Participant
Even is the name that i gave It to the parameter, and the way that i find tô make Revit knows when some númber is even is this formula
rounddown(Parameter/ 2) = roundup(Parameter / 2)
If the númber is diferent from even "not(even)" the númber is odd
0 Likes
Message 8 of 10

Alfredo_Medina
Mentor
Mentor
Accepted solution

The other part would be like this:  (units as metric, for clarity)

 

Alfredo_Medina_2-1700079781311.png

 


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Message 9 of 10

strange4ride
Participant
Participant

Yeah, thanks for share the schedulle, Mine where Full of layers of parameters associated one tô another on my native linguage.

I will try enable this solution as sono as possible, thanks 

0 Likes
Message 10 of 10

Alfredo_Medina
Mentor
Mentor

Another way to know if an integer is odd or even is this: (highlighted)

 

Alfredo_Medina_0-1700081114051.png

 


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin