Revit API

Valued Contributor
Posts: 89
Registered: ‎03-25-2012
Message 1 of 3 (246 Views)

FamillyParameter Structural Material Type

246 Views, 2 Replies
11-16-2012 04:47 AM

Hi All,


I'm creating some structural framing families using the API.

I want to be able to set existing family parameters such as "Structural Material Type" to Steel or Concrete etc.


But I don't seem to be able to identify the built in parameter id (and iterating through existing I can see it).


Can someone please adivse?





New Member
Posts: 2
Registered: ‎11-26-2012
Message 2 of 3 (225 Views)

Re: FamillyParameter Structural Material Type

11-26-2012 12:10 AM in reply to: GeomGym

Try calling the following code passing your instance that you want the parameter ids for.


The ID should be the second value on a line.




private void DisplayParameters(Element instance)


string message = "";

foreach (Parameter p in instance.Parameters)


message += string.Format("{0}:{4} [{1}-{2}] [{3}]\n", p.Definition.Name, p.StorageType.ToString(), p.HasValue, p.StorageType == StorageType.String ? p.ToString() : p.AsValueString(), p.Id);


TaskDialog.Show("Parameters", message);




ADN Support Specialist
Posts: 326
Registered: ‎03-05-2010
Message 3 of 3 (150 Views)

Re: FamillyParameter Structural Material Type

01-16-2013 07:25 AM in reply to: GeomGym


Revit lookup can help to get the built-in parameter member name if you know the parameter name.


After click the "Parameters" property node in the RevitLookup, you can see the button named "Built-in Enums Map..." button. Click this button a dialog shows. Click the Value column to sort the parameter name. Then you can easily found the parameter that you already know its name string. In the right column  is the corresponding built-in member.

Joe Ye
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit