Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get BuiltInParameter from element after FindInserts

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
andresep82
675 Views, 3 Replies

Get BuiltInParameter from element after FindInserts

hello again,

 

i can get the parameter with this code

 

                            foreach (Element win in PickWindows)

                            {

                                ElementId id = win.GetTypeId();
                           
                   
                                ElementType type type_win = doc.GetElement(id) as ElementType;


                                Parameter param_height= type_win.get_Parameter((BuiltInParameter.WINDOW_HEIGHT));

                   
                                parametro_height = param_height.AsDouble();

                                //TaskDialog.Show("Height", parametro_height );
}

 

but when i try get the same parameter afte FindInserts  always return 0

 

  foreach (Wall w in pickedElements)

                    {

                        IList<ElementId> inserts = (w as HostObject).FindInserts(true, true, true, true);

                        foreach (ElementId id in inserts)

                        {

                            Element e = doc.GetElement(id);

                            //GetElementLength(e);

                            Parameter param_HEIGHT = e.get_Parameter((BuiltInParameter.WINDOW_HEIGHT));

                            parametro_HEIGHT = param_HEIGHT.AsValueString();
                            TaskDialog.Show("Areas", "Elements = " + e.Name+"-"+ parametro_HEIGHT );


                           

                        }
                    }

The name of element is ok but..... the height always 0, any suggestion?

 

thanks¡¡¡¡¡

3 REPLIES 3
Message 2 of 4
Revitalizer
in reply to: andresep82

Hi,

 

depending on the Family, there is a type parameter having a valid value.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 4
Revitalizer
in reply to: andresep82

Message 4 of 4
andresep82
in reply to: Revitalizer

thanks¡¡¡

 

nex time i find better.....

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community