Shared Parameters to Family vs. FamilySymbol

Shared Parameters to Family vs. FamilySymbol

Anonymous
Not applicable
322 Views
1 Reply
Message 1 of 2

Shared Parameters to Family vs. FamilySymbol

Anonymous
Not applicable

Hi,

How to I add shared parameter to a family or family symbol.

 

Family family = Helper.RevitHelper.FindElementByName(GVar.RDoc, typeof(Family), listBox_Family.SelectedValue.ToString()) as Family;
                listBox_FamilyTypes.Items.Add(family.Name.ToString());
                
                FamilySymbol symbol = null;


                foreach (FamilySymbol s in family.Symbols)
                {
                    symbol = s;
                    listBox_FamilyTypes.Items.Add("==" + symbol.Name.ToString() + "==" + (s.Category.Id.ToString()));
                    
                }

 in the above code just trying to get the family and family types under that.

Now I need to add non editable parameter to the family or family type.

 

how do it do it. I searched everywhere only thing i can find is family instance or builtin categories.

How do i specify a family or family symbol and add shared parameter to it.

0 Likes
323 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Dear Raghulan,

 

Apparently, you did not search enough.


A large number of samples are available, both online and in the Revit SDK.

 

Here are some classes and methods to look for:

 

  • CategorySet
  • DefinitionFile
  • DefinitionGroup
  • Definition
  • NewInstanceBinding
  • NewTypeBinding
  • Document.ParameterBindings.Insert

To save you the trouble, here one of my more recent samples implementing the entire process:

 

http://thebuildingcoder.typepad.com/blog/2013/12/driving-cnc-fabrication-and-shared-parameters.html

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes