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: 

FamillyParameter Structural Material Type

2 REPLIES 2
Reply
Message 1 of 3
GeomGym
668 Views, 2 Replies

FamillyParameter Structural Material Type

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?

 

Thanks,

 

Jon

2 REPLIES 2
Message 2 of 3
sweetfa2
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);

}

 

 

Message 3 of 3
Joe.Ye
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
Contractor
Developer Technical Services
Autodesk Developer Network

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