How to access Ceiling Type Parameters?

How to access Ceiling Type Parameters?

Anonymous
Not applicable
1,353 Views
1 Reply
Message 1 of 2

How to access Ceiling Type Parameters?

Anonymous
Not applicable

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.

 

0 Likes
Accepted solutions (1)
1,354 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution