公告
Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Default value for new yes/no parameters

Default value for new yes/no parameters

Whenever you make a new yes/no-parameter inside the family editor its first value is always 'yes'. That is annoying if you are fitting a new visibility parameter to an annotation that has 8 entries and needs 16 more. After making the parameters you need to go through all existing family types and manually turn off all the parameters that were not there before.

8 条评论
smallaha
Explorer

I've found that the new entry takes as the default whatever state it was prior to you making it.  Take for instance I want to add a text note.  I make the new block, then I uncheck "visible", then I create the yes\no parameter through the "associate family parameter" option and it defaults the visibility to "no" for all previous family types.  I can expand further if needed, but hope that gets my idea across.

matthew.stachoni
Explorer

When you add the new Yes/No parameters, create a simple formula for the new parameters which ticks them to No, e.g. "=1=2" which evaluates to False. This sets them to No for all family types. Then erase the formulas and check them as required for each type.

 

rasmus.oberg
Enthusiast
Yes! The default behaviour should really be the inverse of the current one. Currenly say adding a yes/no parameter for controlling a new label in a tag family creates a lot of frustration. Didn't know about the formula hack, great workaround but still a poor behaviour, for more detail see: http://architects-desktop.blogspot.com/2016/10/revit-families-yesno-parameter.html
npsteinr
Contributor

Thanks, @matthew.stachoni  This worked, still don't understand why, but thank you!

matthew.stachoni
Explorer

@npsteinr It works because:

  1.  A formula entered in a parameter instantly sets the value across the board, across all family types. For example, you could enter [= 1'-0"] in the formula column in all of your length parameters to set all values across all types to 1'-0", which is helpful to eliminate the 0" used for the default starting value for Length parameters.
  2. Valid formulas must always return results that have the data type set for that parameter. You can't explicitly say [= No], [= False], or [= 0] in the Formula field for a Yes/No parameter - you need a formula whose expression evaluates to Yes or No (i.e. True or False).
  3. To evaluate proper values for Yes/No parameters, you need to use either a comparison (“<“, “>”, “=”) or Boolean operator (“AND”, “OR”, “NOT”). The statement  [= 1=2] always evaluates to False/No which sets that value across the board.

See https://revitiq.com/revit-formulas/

sonicer
Collaborator

If you add parameter(yes, no) as checkbox you can't set the default value.

 

MiWolff
Advisor

In my earlier request for this (https://forums.autodesk.com/t5/revit-ideas/default-value-for-new-yes-no-parameters/idc-p/10392479#M3...@matthew.stachoni pointed out that this can be achieved by adding a formula that generates a downright false value like =1=2.

@MiWolff  Thank you for referencing your Idea! I will go ahead and merge the two.

 

@sonicer  Thank you for your submission!

 

Kimberly

找不到想要的内容?向社区提问或分享您的知识。

提交想法