By default, a door has its function set to 0 which is Interior (1 is Exterior). If you ever create a type catalog for a door family, remember to use 0 and 1 instead of Interior/Exterior!
Again, this doesn't work and results in an error:
Parameter doorFunc = e.get_Parameter(BuiltInParameter.FUNCTION_PARAM);
This returns the door's function- Interior or Exterior:
static public string GetDoorFunction(Element e)
{
Parameter param = e.ObjectType.get_Parameter(BuiltInParameter.FUNCTION_PARAM);
string doorFuncVal = param.AsInteger().ToString();
return doorFuncVal;
}
I noticed that 'ObjectType' is deprecated, but I'm not having any luck with using the ElementId/ElementType right now.
And to get a door's family name:
static public string GetDoorType(Element e)
{
FamilyInstance fi = e as FamilyInstance;
string value = fi.Symbol.Family.Name;
return value;
}
And the result:
BASE Interior Doors: ********** Single swing, 2468 Single swing, 2468 Bi-Fold 2 Panel (TC), 2068 Double bifold, 4068 Single swing, 1668 Single Swing, 2068 BASE Exterior Doors: ********** double slider, 6068 SGD garage door_16ft, 1680

No comments:
Post a Comment