Announcements
Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Allow text in formulas

Allow text in formulas

Allow text parameters in formulas.
e.g Fire Rating = FireRating
(as in NBS BIM Object standard)
96 Comments
dazza1639
Advocate

creating strings with formulas would also be good, we could populate the description field by combining the text contents of other fields for example

Formula

="CoreThickness" mm thick "Manufacturer" "Model" "Lay Direction" lay composite cladding "Panel Application" panel, colour"External Material" .

 

Would produce

 

80mm thick Kingspan KS1000RW left to right lay composite cladding roof panel, clolour Kingspan Spectrum Baltic Blue.

 

We currently do something similar with dynamo

KM_Springfield
Advocate

You could simply follow the Excel syntax of = "some text" & ParamaterValue & "some other text"

 

How ever they choose to do it I hope it happens soon, I would use it in hundreds of models (no exaggeration either!).

harmenverburg
Enthusiast

Indeed, this would be really nice to have! Instead of comparing numbers in formulas etc.

sasha.crotty
Community Manager
Status changed to: Under Review

Thanks for your submission and votes on this idea!  We are evaluating where this request falls into our roadmap and will provide an update when we have made a decision. 

 

The Factory

RobertAGlover
Advocate

I would like to be able to reference text based parameters in conditional statements based on if they contain certain text. For example have a statement that says IF(Description=*TEXT*,"DESCRIPTION","NEED INPUT") where the asterisks are wildcards; this would search the parameter Description and if it contains the letter TEXT in that order at any point it would put "DESCRIPTION" as the response. If the Description does not contain the letters TEXT it would return "NEED INPUT". This does have the downside of returning false positives such as if Description contained "CONTEXT REQUIRED" it would return "DESCRIPTION". But it opens up a lot more doors than pit traps in my opinion.

yavork
Advocate
RobertAGlover
Advocate

Good call. I didn't see this older post when I searched. However it is currently under review. and thus ineligible for thumb-up. But hopefully that means it's moving on to the next stage of development.

doni49
Mentor

@robert.glover wrote:

However it is currently under review. and thus ineligible for thumb-up.


Actually that's not the case.  I just voted for it myself.  If the vote button is greyed out for you, then you must've already voted for it (and likely forgot).

RobertAGlover
Advocate

You are correct. I had realized the issue as to why it was grayed out and neglected to post my findings here. Thank you for reminding me.

 

 

SamuelAB
Advocate

It's surprising that this is still missing, this will be a powerful tools for automating schedules, especially when paired with Key Schedules.

harmenverburg
Enthusiast

Any expectation or estimation to which release this will be added? 

lee.birkett
Explorer

I would like to create text strings to poulate the description field as above but include a string conversion for number or unit based parameters. Perhaps string converters to keep the project units and string converters to strip them?

 

Description = STRINGU(Airflow) + " " + STRING(Capacity) + " direct fired make-up air unit" + IF(Curb, " w/ factory curb", "")

 

for example.

pieter5
Advisor

For me, this idea means two things

 

  1. being able to drive a text parameter based on a formula (for example creating a description field based on actual parameter values like dimensions, materials, yes/no parameters, ...)
  2. being able to use a text parameter inside a formula (if textfield="this text",...). Additional benefits would be if we have wildcard operators.
tomek
Collaborator

This idea is also related to my idea of being able to reference parameters pretty much anywhere where one can enter text:

 

https://forums.autodesk.com/t5/revit-ideas/make-substitution-variables-available-everywhere-where-te...

 

As an aside, syntactically speaking using generic text in formulas is tricky. Text with spaces will have to be quoted. What about text with spaces and quote characters? It's not trivial. Certainly variable names should not be allowed to have spaces or any fruity characters in them. There is a reason why this convention is used by all programming languages that I know (Perl, Python. Ruby, C, C++, Javascript, Java, etc)

 

Convenience always has its price. I think that most people who use Revit are intelligent enough to be able to adapt to certain generally accepted conventions for dealing with formulas and code in general. And if they're not then they have no business using those features. They will just shoot themselves in the foot and then start requesting safety features etc.

 

-t

 

 

pieter5
Advisor

It would also be super helpful if we could subtract characters in addition to do concatenations.  

 

For example: I would like to subtract prefixes from my sheet numbers, (not showing the suffix, or only showing the suffix). In theory we could split these up in separate parameters but that's not always feasible (no duplicate sheet numbers allowed). 

 

If we could subtract characters we would do F1-A-100.00 as sheetnumber, but only show A-100 in the callouts/titleblock as the other stuff is not relevant in those scenarios.

 

Perhaps Revit could borrow the syntaxis from Excel? https://www.extendoffice.com/documents/excel/560-excel-remove-character-from-string.html

 

sarsenault2CCSS
Advisor

To be honest, I basically expect most of the basic Excel formulas to be present in Revit. Anything else is disappointing.

r.robert.bell
Advocate

We really need a way to concatenate string and values in formulas. For example, in HVAC, for diffuser/grille schedules, it is very common to have a column that lists the face dimension of the elements. However, in some cases, the face dimension is a diameter and in other cases it will be a rectangular dimension.

 

So we need a calculated field that does something like this:

 

if(Face Diameter=0,concatenate(Face Length,"×",Face Width),concatenate(Face Diameter,"Ø"))

 

We need this function everywhere that we can use formulas and not just in schedules.

 

This function has been requested for years. Other typical text handling functions are also needed, but I don't want to muck up the thread.

 

Frankly, AutoCAD MEP is superior in this regard because it allows for VBScript in their property set data which makes the data more usable and presentable.

Tags (3)
phyllisr
Enthusiast

It is not just the MEP modelers who want this.  There are lots of formula options that could be better but this is definitely at the top of the list.

Anonymous
Not applicable

Inventor had the ability to reverence VBA functions in their parameters to do cals like this. Some of these core concepts should really be leveraged across all the product lines.

bveron12
Explorer

There's 3 functions I would like to use often:

 

- concatenate: fill in a text parameter based on other parameters (text, numbers, lengths, ...)

- equality check: drive another parameter (text, numbers, lengths, ...) based on an quality check of a text field (is empty or equals a specific value)

- extract characters (from position X to position Y) This will help with accommodating numbering standards etc (being able to have one field and pull it apart in prefix+middle+suffix.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Rail Community


Autodesk Design & Make Report