Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Formula - convert number to text

13 ANTWORTEN 13
GELÖST
Antworten
Nachricht 1 von 14
Anonymous
17841 Aufrufe, 13 Antworten

Formula - convert number to text

Hey.

I have a family, with the parameter:

Diameter = 8

 

Now i want to use the Diameter parameter in the description, but i get a failure their say's, "Inconsistent Units". Is it in anyway possible to use the number parameters, in a text string??

 

Nichlas

13 ANTWORTEN 13
Nachricht 2 von 14
barthbradley
als Antwort auf: Anonymous

Use a neutralizer. Divide by one or multiply by one.   

 

http://autodesk-revit.blogspot.com/2008/01/neutralize-those-units.html

 

No,  you cannot use a number parameter in a text parameter.  

Nachricht 3 von 14
barthbradley
als Antwort auf: Anonymous

...do I win anything, Sport?

 

"Anything I can smoke, drop, shoot, snort, rub into your belly or whatever?" 

                                                                 George Carlin. 1937-2008. May his humor live on.     

 

 

Nachricht 4 von 14
bin
Advisor
als Antwort auf: Anonymous

If you only have a few standard diameter options, you can use if() to make it work.

Something like: if(Diameter = 8 mm, "8", if(Diameter = 10 mm, "10", if(Diameter = 12 mm, "12", "Non Standard")))

Nachricht 5 von 14
RFreund
als Antwort auf: barthbradley

I see that you put a strikethrough on the neutralize unit recommendation. 

Is this because it doesn't work anymore or this because it is not recommended. It is odd that you can't do this or that there isn't a function for this. Reason being is that you can get it to work with tags, so somewhere this functionality/formula exists within Revit. 

Nachricht 6 von 14
ToanDN
als Antwort auf: RFreund

What is your formula?
Nachricht 7 von 14
RFreund
als Antwort auf: ToanDN

Well I don't really have a specific formula. I was looking for a formula that would convert a length parameter to text. The same way that a Tag can. 

 

For example. Let's say you have various Tile sizes (width x height). You can create a shared parameters for width and height. You can load this family into your project and create a Tag that names each tile instance T(width) x (height). You can also schedule all the tiles and sort them by width and height. However, it would be nice if their Tag name was also in the schedule. I'm unaware of a way to achieve this. One thought would be to make a shared text parameter (or using an existing one, such as description) and somehow converting the width and height dimensions to text and connotate that to the "T". 

 

So if you had a 100mm x 200m tile your Tag and Description would read: T100x200

Nachricht 8 von 14
ToanDN
als Antwort auf: RFreund

A tag doesn't convert anything, you are just putting several parameters and
prefix/suffix in a label. You can do exactly the same using combined
parameters in a schedule. But you cannot do it with a formula.
Nachricht 9 von 14
barthbradley
als Antwort auf: RFreund


@RFreund wrote:

I see that you put a strikethrough on the neutralize unit recommendation. 

Is this because it doesn't work anymore or this because it is not recommended. It is odd that you can't do this or that there isn't a function for this. Reason being is that you can get it to work with tags, so somewhere this functionality/formula exists within Revit. 


 

No, Divide and Multiply are still neutralizers -- they just don't apply in this case. I misread and the OP's post initially.  

Nachricht 10 von 14
RFreund
als Antwort auf: ToanDN

Wow, thank you. I just didn't see that icon and didn't know that was an option. 

Nachricht 11 von 14
martijn_pater
als Antwort auf: RFreund

Just fill in the description for the type manually and use that in your tag.

Maybe upvote this idea.  And perhaps also this idea, that could open up some possibilities to do some more things like this with key schedules.

Nachricht 12 von 14
JedSanford
als Antwort auf: Anonymous

I know this is old but for future people this can be done with dynamo pretty easily.

Nachricht 13 von 14
PierreHoudeMcLean
als Antwort auf: JedSanford

Try this ' My Shared Paramerter is Text, And I wanted to tag my plate  if I chose a plate that had 3 or 4 for holes, so :leicht_lächelndes_Gesicht:  if(Top Plate 3 Holes, "3", "4") My parameter of Number of holes changes from 3 to 4 :leicht_lächelndes_Gesicht:

Nachricht 14 von 14
LucasJonnedeJong
als Antwort auf: Anonymous

You can do it with a LookupTable.  which is basically the same as an if-statement, just simpler to implement if you have many options.  if you have 1000 (or more) options for numbers that you want to turn into a text, just list them in the lookup column, and return the same but as a text from the next column.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report