How to Get List of All Parameter and values of Wall or any element

How to Get List of All Parameter and values of Wall or any element

Anonymous
Not applicable
8,937 Views
1 Reply
Message 1 of 2

How to Get List of All Parameter and values of Wall or any element

Anonymous
Not applicable

Dear Guys.

 

When i going to get schedule then i will got Following Properties for Wall:

 

WallSchedule.png

 

In API when i use

 

 Category cat = _doc.Settings.Categories.get_Item(BuiltInCategory.OST_Walls)

 List<ElementId> catList = new List<ElementId>();

 catList.Add(cat.Id);

 ParameterFilterUtilities.GetFilterableParametersInCommon(_doc, _catList).ToList();

 

It gives me list of Parameters: In which above RED Mark Parameter is not Available.

 

WallProp.png

 

I can find parameter in 

 

Wall wTmp= Wall;

IList<Parameter> lstOrdPrms= wTmp.GetOrderedParameters();

 

But in this list there is some more paramater.

 

Now i want to know is there is any way to List all parameter like schedule and get there values. Because some paramater like width is available in  in type. Not in Parameter list.

 

Note: This happen in almost all element.

 

Thanks 

 

 

 

 

0 Likes
8,938 Views
1 Reply
Reply (1)
Message 2 of 2

bxw
Enthusiast
Enthusiast

Bhola,

 

The way you are getting the parameters is only getting parameters that are available for filtering or sorting (ordering).  

 

GetFilterableParametersInCommon

GetOrderedParameters

 

You can go over all of the parameters like this:

 

// e is some element

ParameterSet pSet = e.Parameters;
foreach (Parameter p in pSet)
{
  //check if Parameter name is Width 
  if(p.Definition.Name.Equals("Width")){
     //Do something with the value....
     string myWidth = p.AsString();

  }
}