Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Shared Parameters to Family vs. FamilySymbol

1 REPLY 1
Reply
Message 1 of 2
raghulan
244 Views, 1 Reply

Shared Parameters to Family vs. FamilySymbol

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.

Regards,

Raghulan Gowthaman Cert IV TAA, B.E,.
Senior Technical Consultant | Developer - R&D
A2K Technologies Sydney
Web : www.a2ktechnologies.com.au
www.civil3dforum.com | www.e4forums.com
www.zcodia.com.au
www.raghulangowthaman.com
1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: raghulan

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community