Locking (greying out) the value of a family type parameter

Locking (greying out) the value of a family type parameter

Kev_D
Collaborator Collaborator
11,291 Views
14 Replies
Message 1 of 15

Locking (greying out) the value of a family type parameter

Kev_D
Collaborator
Collaborator

I would like to grey out the value of my Family type:doors parameters. They are controlled by yes/no and integer parameters so they have no need to ever change. Any one have any idea of how to achieve this. 

 

type.doors.JPG

 

 

Accepted solutions (1)
11,292 Views
14 Replies
Replies (14)
Message 2 of 15

barthbradley
Consultant
Consultant

I'd love to examine your family. It doesn't make sense to me from what I see.  I'm guessing it's working for you, but I need to see all the parameters to understand how. But, in answer to your main question, I'm pretty certain you can't lock Family Types in the way you would lock others by a formula such as if(1=1, [ValueA], [ValueA]).  But, if they don't change ever, then why the need for the label?   

0 Likes
Message 3 of 15

Kev_D
Collaborator
Collaborator

Yes, I had a feeling it would be difficult for some to understand. When you spend so much time on a family, you tend to probably overdo some aspects of it. 

 

The family has 3 door panels types (A, B, & C). A double door would consist of A1 & A2, B1 & B2, C1 & C2. If a type is duplicated and changed, I did not want people changing the type and some may find it confusing, so I introduced a

numbering system. 

Capture.JPG

 

 

These numbers control the types in the previous image, and the number refers to office standards. So everyone knows what Panel Type A is, and so on, so I thought it would be easier for people to see this and say, 1 is A. Simple!

 

I want to grey out the type parameter values so they can never be changed. Like the way you would grey a length parameter value by placing the exact length in the formula (like the image below). 

1.JPG

 

0 Likes
Message 4 of 15

barthbradley
Consultant
Consultant

I get what you're doing with integers to ID elements for Visibility control, but I do it completely differently  -- probably because I did exactly what you're trying to do a long time ago and crashed and burned miserably! Ha!

 

That being said, I hate using Family Type Parameters, and avoid them like the Plague.  They are problematic at best, and especially difficult to control/manage when uneducated others have to use the family.  Keep in mind that those drop down boxes will populate with every single shared <Generic Model> in the Project, once they are loaded. Good luck sifting through that mess to find the appropriate family. And, if you pick the wrong one, the family will bust in the Project.   

 

With regard to "graying out" those parameters; there's no way to do it --  or that I have found. Like I said before, I typically use "if(1=1, [ValueA], [ValueA])" (e.g. Length =if(1=1, 4'-0", 4'-0")) to gray out the field.  But that doesn't work on Family Type Parameters.   

0 Likes
Message 5 of 15

Kev_D
Collaborator
Collaborator

Haha. Yes, that is what Revit is all about. We crash and burn many times, but if we didn't we wouldn't learn. Many forums recommend using types, and so far I have had no issues, but I understand exactly what you mean.... Projects & Templates will develop and become more complex.

 

In saying that, this is exactly why I was hoping I could lock the value. Even if more families are loaded, there should be no need to sift through them, as the are what they are. That is why a parameter is created for each panel type (so they don't have to be changed). I only wanted to lock them so others will not mess with them. When a new panel type comes into play, I will just add type D to the family and give it the next number 4 and change parameters where necessary. 

 

I would ask you how you do it differently, but I have spent so much time on Doors that I just need to walk away. They work well as is, I just wanted to tie up some loose ends. 

0 Likes
Message 6 of 15

Anonymous
Not applicable

(e.g. Length =if(1=1, 4'-0", 4'-0"))

 

as a curiosity (unless i may be missing something) , why would you need to create an "if condition" that generates one single value to lock the length field? 

 

length parameter = value

 

Thanks, 

RP

 

Capture.PNG

0 Likes
Message 7 of 15

barthbradley
Consultant
Consultant

So the Parameter cannot be used in the Project. It'll gray out the Parameter in the Project. Basically, it eliminates confusion. We do it quite a lot.    

0 Likes
Message 8 of 15

Anonymous
Not applicable

@barthbradley wrote:

So the Parameter cannot be used in the Project. It'll gray out the Parameter in the Project. Basically, it eliminates confusion. We do it quite a lot.    


I got that, i use it too. but why using an "if formula" if you can lock the parameter with just the value?

see my previous screenshot



that it was my confusion on that 🙂

0 Likes
Message 9 of 15

Kev_D
Collaborator
Collaborator

Unfortunately the type family does not work like that. Works great for dimension parameters but not for the parameter in question.

 

The formula can equal a number, but it can not equal the name of a family type.

Message 10 of 15

FAIR59
Advisor
Advisor

you can use a non-USERMODIFIABLE Shared parameter to accomplish your goal.

 

greyedParameter00.PNG

in family-editor: 

greyedParameter.PNG

 

in project:

greyedParameter_01.PNG

Message 11 of 15

Anonymous
Not applicable
Accepted solution

@FAIR59 wrote:

you can use a non-USERMODIFIABLE Shared parameter to accomplish your goal.

 

greyedParameter00.PNG

in family-editor: 

greyedParameter.PNG

 

in project:

greyedParameter_01.PNG


This is a great way, however, if you change something, you need to purge the family from the project and load it again...  it won't update otherwise.

Message 12 of 15

fitogm81
Explorer
Explorer
Excellent. I have been working with shared parameters for a long time and I didn't knew about this property. Thanks!.
0 Likes
Message 13 of 15

mark.mountain
Enthusiast
Enthusiast

Learnt something new today. Making a shared parameter un-editable like that. 

I have a situation though where I have 3 parameters for example. The all use the same category and same family within the project. as soon as edit the parameter file to make the parameter un-editable as shown above. when I add the shared parameter to the family, it defaults to the same one family type for all of them. 

I want;

parameter 1 to be type A
parameter 2 to be type B
parameter 3 to be type C etc etc

But when making the shared parameter non user editable and I bring the parameters in. All I get is...

parameter 1 to be type A
parameter 2 to be type A
parameter 3 to be type A etc etc

And they're greyed out now due to the non user editable edit so I can change them to what I want. 

0 Likes
Message 14 of 15

MattMFNXBV
Explorer
Explorer

Hello,

 

Reviving an old thread here.  Locking a shared parameter by editing the shared text file is useful to prevent user editing, but as @mark.mountain pointed out, once the 'locked' shared parameter is loaded into the family editor, no changes can be made to its value.  I'd suggest a workaround that combines the best of both worlds.

 

1 - Create a <family types> parameter from the Types dialogue box in the normal manner.  This parameter should not be shared.

2 - Associate the <family types> parameter with the correct nested family.

3 - Set the value for each <family type> using the dropdown menu.  This value can differ from type to type within the parent family.

4 - Create a shared <family types> parameter with the EXACT same name as the family parameter created above.

5 - Select the original, non shared <family types> parameter and click the pencil button to edit.  Change the parameter to be shared.

6 - Select the shared <family types> parameter created in step 4 to replace the parameter being edited.  

7 - Finish editing the parameter.  The parameter is now shared & locked, but Revit will retain all the original type values set in step 3.

Message 15 of 15

johannes_venterEQLRA
Observer
Observer

@MattMFNXBVMaybe I missed something, I have created my shared parameters and attempted to lock them as suggested above but they are still editable. Any advice?

 

0 Likes