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: 

Parameter String Value Controls Yes/No Visibility Parameter

15 ANTWORTEN 15
Antworten
Nachricht 1 von 16
DavidHarrington-WPM
2251 Aufrufe, 15 Antworten

Parameter String Value Controls Yes/No Visibility Parameter

I'm at my wits end on this one. Here's a run down of what I'm trying to do.

 

Type Parameters:

MyTextString - Text Parameters

HideTheDetailLine - Yes/No Parameter

 

When MyTextString has a value other than "". then enable the Yes/No parameter HideTheDetailLine.

 

I've tried to figure it out using this formula for the HideTheDetailLine parameters.

 

if(MyTextString),1=1,1=0)

 

But that isn't working...I get "Comma not expected" error.

 

Anyone know the vernacular here?

15 ANTWORTEN 15
Nachricht 2 von 16
ToanDN
als Antwort auf: DavidHarrington-WPM

Text parameters cannot be used to drive formula. Use another parameter type such as Yes/No, Number, Integer, etc to drive your formula.

For example: Use an integer parameter [Int] to drive a Yes/No parameter.

if (Int = 1, 1=1, 1=0)

https://revitforum.org/showthread.php/1046-Revit-Formulas-for-quot-everyday-quot-usage

Nachricht 3 von 16
DavidHarrington-WPM
als Antwort auf: ToanDN

Not sure I understand. Do you mean create additional parameters that not text based to then control the other 2 parameters display?

Nachricht 4 von 16
ToanDN
als Antwort auf: DavidHarrington-WPM

Please read my reply again.
Nachricht 5 von 16
DavidHarrington-WPM
als Antwort auf: ToanDN

Hi again,

 

I've read your reply. Perhaps my problem may not have a solution, but that is what I'm wanting to do. If a parameter has a value greater than nil, then I would like a formula to understand that and impact a Yes/No parameter so that I can control the display of something else for when the text value is blank or filled.

Nachricht 6 von 16
ToanDN
als Antwort auf: DavidHarrington-WPM

The solution is NOT using a text parameter, but another type such as a number parameter.
Nachricht 7 von 16
DavidHarrington-WPM
als Antwort auf: ToanDN

Can you point me to how I can use the string value from my text parameter to control the display of other elements?

Nachricht 8 von 16

https://revitforum.org/showthread.php/1046-Revit-Formulas-for-quot-everyday-quot-usage

 

NOTE: "Conditional statements can contain numeric values, numeric parameter names, and Yes/No parameters."

Nachricht 9 von 16

That is an impressive forum thread and has what seems like a 100 different formulas. And that's just the first post...

Nachricht 10 von 16
ToanDN
als Antwort auf: DavidHarrington-WPM


@DavidHarrington-WPM wrote:

Can you point me to how I can use the string value from my text parameter to control the display of other elements?


No you cannot use a text parameter to control the display of other elements. Use another type of parameter instated, as siad in the previous posts.

Nachricht 11 von 16
ToanDN
als Antwort auf: DavidHarrington-WPM


@DavidHarrington-WPM wrote:

That is an impressive forum thread and has what seems like a 100 different formulas. And that's just the first post...


Think it is the same link in my 1st reply.

Nachricht 12 von 16


@DavidHarrington-WPM wrote:

That is an impressive forum thread 


 

Agreed. And an excellent resource to keep handy.  Bookmark it or print it.  

Nachricht 13 von 16

Not possible to test for text condition in a formula as mentioned, so you will need three (or four) parameters something along the lines of:

parameter text input [textinput]
parameter text output : IF( [textinputhasavalue] , [textinput] , "")
parameter yes/no [textinputhasavalue]
(parameter yes/no) [hidemyline] : NOT( [textinputhasavalue] )

or

parameter text input [textinput]
parameter text output : IF( NOT([textinputhasavalue]) , "" , [textinput])
parameter yes/no [textinputhasavalue] (associate to line visibility directly ie.)

 

edit: may have read your question wrong since you want to enable the visibilitytoggle, but basically the answer is the same... to do it the other way around.

Nachricht 14 von 16

Thanks Martijn, that is helpful.

 

So if I'm understanding the situation - I can manually "flip the switch" on the toggle which in effect can "" a secondary text parameter and control the display of elements via that toggle.

 

But I'm still stuck in that the value (or lack thereof) isn't driving the visibility. Rather it is being controlled by my fingers as I flip that switch. Am I correct here?

Nachricht 15 von 16


@DavidHarrington-WPM wrote:

But I'm still stuck in that the value (or lack thereof) isn't driving the visibility. Rather it is being controlled by my fingers as I flip that switch. Am I correct here?


Correct, see also edited post. Note that with the above you could still leave the input field empty whilst toggling it on anyway... so then it kind of defeats the purpose, but it might be the best approach anyway...

 

BTW what kind of text input are we talking about? Is it a finite number of options or random text? 

Nachricht 16 von 16

Basically unknown text value. The value is shown via a nested symbol in my family. Then there is the detail line in my family. The 2 are related. When the value in my parameter is not nil, it'll show in the nested symbol. However, when the value is my parameter is nil, I get a "?" showing in the nested symbol. So I have to turn that off AND I have to turn off the detail line that is associated with it. Using a bank of toggles for each text/line that is part of my family isn't ideal - but if that is my only option then so be it.

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