Numerical parameter formulas - is there a [this] variable?

Numerical parameter formulas - is there a [this] variable?

Tupaia
Advocate Advocate
1,597 Views
9 Replies
Message 1 of 10

Numerical parameter formulas - is there a [this] variable?

Tupaia
Advocate
Advocate

Hi!
Quick question: is there a way to refer to the existing parameter in a formula? Like:

=[this]*2

=[this]+5

'this', of course, means the exising value.

I'd need this because I want to change multiple parameters (topo point Elevation in this case) at once.

Thanks a lot!

Best regards

0 Likes
1,598 Views
9 Replies
Replies (9)
Message 2 of 10

barthbradley
Consultant
Consultant

The way you have it written is exactly right. =Parameter Name *2 or =Parameter Name +5.  You can even put brackets around Parameter Name like you are you showing, which needs to be done in instances where Parameter Name contains certain characters.  

 

Here's some other information and rules that may help you in writing formulas:  

 

https://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html

 

 

 

 

0 Likes
Message 3 of 10

Tupaia
Advocate
Advocate

Thank you very much!
I still cannot get it to work, though.

Example: 2 walls with different height, both are selected. What's the exact formula to multiply the parameter 'Unconnected Height' by 2?

 

= (Unconnected Height) * 2

 

does not work - error message "the following string is not recognized: Unconnected Height"...

What's the 'magic symbol' for the variable itself?

Thanks!

0 Likes
Message 4 of 10

barthbradley
Consultant
Consultant

I'm confused. Where you are writing this formula? 

0 Likes
Message 5 of 10

ToanDN
Consultant
Consultant
You can only do it for one wall or walls with identical 'Unconnected Height' value, by select the walls and enter "=2 * [the actual existing value, not this text]" in the 'Unconnected Height" box.
0 Likes
Message 6 of 10

Tupaia
Advocate
Advocate

screenshot parameter.png

 

I guess you know what I mean - using the variable/parameter itself in the formula.

Not possible?

Thanks!

0 Likes
Message 7 of 10

barthbradley
Consultant
Consultant

Wow, I totally missed your point.  No, that's not possible.  

0 Likes
Message 8 of 10

Tupaia
Advocate
Advocate

Ok, thanks!

Unfortunate... I guess I will post that in the idea forum. Would be a super nice and quick way to adjust multiple object's parameters.

Best regards

0 Likes
Message 9 of 10

ToanDN
Consultant
Consultant

@Tupaia wrote:

screenshot parameter.png

 

I guess you know what I mean - using the variable/parameter itself in the formula.

Not possible?

Thanks!


As I said, it is only possible when the value is exposed, meaning one wall or wall with identical Unconnected height.  You could create a wall schedule, sort by Unconnected height, un-itemize rows to group them, and do it for each one.

0 Likes
Message 10 of 10

Tupaia
Advocate
Advocate

Ok, but that's beside the point - being able to edit quickly.

I came across the idea because I wanted to lift a selection of 1000s of topo points by a value, without chaning to front view and moving them. Topo points have the parameter 'Elevation'. I thought I could just enter something like

=*+10

and be done.

The concept would be useful in many other cases, too, I think.

Thanks!

 

0 Likes