"Structural" property for built-in parameter

"Structural" property for built-in parameter

Anonymous
Not applicable
1,437 Views
5 Replies
Message 1 of 6

"Structural" property for built-in parameter

Anonymous
Not applicable

For the attached image,

 

I have to enable "Structural" property for built-in parameter  using get_Parameter("").Set(1). Kindly let me know built-in Parameter name?

 

 

0 Likes
Accepted solutions (1)
1,438 Views
5 Replies
Replies (5)
Message 2 of 6

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution
 Element e;
                        Floor F = e as Floor;
                        Parameter P = F.get_Parameter(BuiltInParameter.FLOOR_PARAM_IS_STRUCTURAL);
                        if(P!=null)
                        {
                            P.Set(1);                            
                        }

Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 6

Anonymous
Not applicable

Thank you naveen

0 Likes
Message 4 of 6

Anonymous
Not applicable

Hi Naveen,

 

I have tested now and FLOOR_PARAM_IS_STRUCTURAL is returning NULL. Its not working. 

 

 

0 Likes
Message 5 of 6

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @Anonymous,

Are you trying to set Structural property for Floor?

From your attached file,I assumed  that you are trying to set structural property for floor.

If you are trying to set structural property for Floor it should work because I tested it and it works fine for me.

Could you please provide any other information for further analysis?

 

Thanks,

Naveen Kumar.T


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 6 of 6

Anonymous
Not applicable
Here is my code. Kindly review.
FilteredElementCollector collector = new FilteredElementCollector(doc);
IList foundations = collector.OfCategory(BuiltInCategory.OST_StructuralFoundation).WhereElementIsNotElementType().ToElements();
using (Transaction t = new Transaction(doc, "Bind Param"))
{
t.Start();
foreach (Element ifloor in foundations)
{
FamilyInstance gfloor = ifloor as FamilyInstance;
if (gfloor != null)
{
Parameter P = gfloor.get_Parameter(BuiltInParameter.FLOOR_PARAM_IS_STRUCTURAL);
if (P != null)
{
if (!gfloor.get_Parameter(BuiltInParameter.FLOOR_PARAM_IS_STRUCTURAL).IsReadOnly)
gfloor.get_Parameter(BuiltInParameter.FLOOR_PARAM_IS_STRUCTURAL).Set(1);
}

Parameter iParam = gfloor.get_Parameter(BuiltInParameter.STRUCTURAL_ANALYTICAL_MODEL);
if (iParam != null)
{
if (!gfloor.get_Parameter(BuiltInParameter.STRUCTURAL_ANALYTICAL_MODEL).IsReadOnly)
gfloor.get_Parameter(BuiltInParameter.STRUCTURAL_ANALYTICAL_MODEL).Set(1);
}
}
}
t.Commit();
}
0 Likes