Changing FamilySymbol Parameter

Changing FamilySymbol Parameter

Anonymous
Not applicable
1,263 Views
6 Replies
Message 1 of 7

Changing FamilySymbol Parameter

Anonymous
Not applicable

Hi, I've been struggling with this for a while now. I have a parameter in an element, which as far as I know is a FamilySymbol. It looks like this:snip1.PNG.

 

The family this belongs to is called Windows, which contains all sorts of window types. What I'm trying to do is simply change this parameter to another one. I've tried it with set, with and without using a family symbol which returned this:

 

famsymbol.PNG

but still no luck. Maybe I should start over from scratch but I'm not sure how to solve this.

0 Likes
1,264 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Hello ramas,

 

Could you please describe the parameter you are trying to change a bit more? Is it type int or string or is it a list where you can chose the one you want?

 

Also, have you seen if it is read-only?

 

Cheers

Ruben

Message 3 of 7

Anonymous
Not applicable

Hi, thanks for your reply! It is a dropdown yes, and it is not readonly (readonly set to false). It also is not usermodifiable, not sure if that makes a difference.

0 Likes
Message 4 of 7

Anonymous
Not applicable

And are you trying to set a value other than the ones in that dropdown list?

 

Please, see these links:

 

http://thebuildingcoder.typepad.com/blog/2015/11/drop-down-enumerated-parameter-values.html

 

http://thebuildingcoder.typepad.com/blog/2014/04/element-id-export-unique-navisworks-and-other-ids.h...

 

In some cases, negative element ids are also used to enumerate various parameter value options displayed in property palette drop-down lists.

In some cases, the Revit API does not expose any direct method to determine the string values corresponding to these negative element ids. If so, you can find the matching relationship using RevitLookup. Select the various target options one by one in the parameter drop-down list and use RevitLookup to see the resulting parameter values. Use this procedure to build a mapping between display strings and the corresponding integer parameter values.

 

 

So, if you are trying to set a value that is part of the dropdown list, I suggest that you first map the available options and their ids in a List, and then set the value of your parameter according with the options available. If you try to set a value other than the ones from that list, perhaps give you error?? I don't know..

 

I'm sorry but I don't have enough knowledge to help you further. i think Jeremy might help you more on this subject.

 

Cheers and good luck

Message 5 of 7

Anonymous
Not applicable

Yes I'm trying to switch it out to one that's in the list. Thanks for the elaborate reply! I'll check it out right now.

0 Likes
Message 6 of 7

Anonymous
Not applicable

Sadly I didn't get it to work but thanks for the help!

0 Likes
Message 7 of 7

so-chong
Advocate
Advocate

Hi, just to be sure we are talking about the same kind of window family.
Window families can consist of 3 kinds of families; system/loadable families and in-place families.
Do you know what kind of family you are dealing with?
When you select a window an 'edit family' (only system/loadable families) will appear in the ribbon.
If not, and an 'edit-in-place' (in-place) will appear.

 

edit-in-place_family.png

0 Likes