Message 1 of 2
Not applicable
03-01-2017
09:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to access Ceiling Type parameters (ie: Type Mark or any project parameters).
In the code below, "param" stays null for Ceiling if value = "Type Mark".
Note: I can't use built-in values as the user type the names of the required parameters.
Parameter param = null;
Element e = currentSet.FirstElement(); // currentSet is a FilteredElementCollector that may contain Ceiling elements
if (e is FamilyInstance)
{
FamilyInstance inst = (FamilyInstance)e;
if (inst == null)
{
return null;
}
// Get the parameter
FamilySymbol symb = inst.Symbol;
Family fam = symb.Family;
param = inst.LookupParameter(value);
if (param == null)
{
param = symb.LookupParameter(value);
}
}
else if (e is Wall)
{
Wall w = (e as Wall);
param = w.WallType.LookupParameter(value);
}
else if (e is RoofBase)
{
RoofBase r = (e as RoofBase);
param = r.RoofType.LookupParameter(value);
}
else if (e is Ceiling)
{
Ceiling c = (e as Ceiling);
// There is no equivalent to WallType or RoofType and default Lookup doesn't work.
param = c.LookupParameter(value); // returns null
}
else
{
param = e.LookupParameter(value);
}Any help is much appreciated.
Solved! Go to Solution.