<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can get the Floor elevation and Beam elevaton?. in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-can-get-the-floor-elevation-and-beam-elevaton/m-p/5577016#M73017</link>
    <description>&lt;P&gt;Dear Frank,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am happy to see that you are using RevitLookup to explore the database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It enables you to answer these question yourself, if you look more closely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, I would suggest something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="cf"&gt;
&lt;PRE class="cl"&gt;&amp;nbsp; &lt;SPAN class="cb1"&gt;Floor&lt;/SPAN&gt; floor = ... ;
&amp;nbsp; &lt;SPAN class="cb1"&gt;Level&lt;/SPAN&gt; level = doc.GetElement( floor.LevelId ) &lt;SPAN class="cb2"&gt;as&lt;/SPAN&gt; &lt;SPAN class="cb1"&gt;Level&lt;/SPAN&gt;;
&amp;nbsp; &lt;SPAN class="cb2"&gt;double&lt;/SPAN&gt; elevation = level.Elevation;
&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2015 07:54:49 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2015-04-09T07:54:49Z</dc:date>
    <item>
      <title>How can get the Floor elevation and Beam elevaton?.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-can-get-the-floor-elevation-and-beam-elevaton/m-p/5576574#M73016</link>
      <description>&lt;P&gt;Hello everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How can get the Floor elevation and Beam elevation?. I need the Double value.&lt;BR /&gt;2. How can get the nether elevation the same element (Floor)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" width="669" src="https://forums.autodesk.com/t5/image/serverpage/image-id/162758i0D1295769F464048/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="get_elevation_1.png" height="376" title="get_elevation_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2015 22:09:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-can-get-the-floor-elevation-and-beam-elevaton/m-p/5576574#M73016</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-08T22:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can get the Floor elevation and Beam elevaton?.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-can-get-the-floor-elevation-and-beam-elevaton/m-p/5577016#M73017</link>
      <description>&lt;P&gt;Dear Frank,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am happy to see that you are using RevitLookup to explore the database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It enables you to answer these question yourself, if you look more closely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, I would suggest something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="cf"&gt;
&lt;PRE class="cl"&gt;&amp;nbsp; &lt;SPAN class="cb1"&gt;Floor&lt;/SPAN&gt; floor = ... ;
&amp;nbsp; &lt;SPAN class="cb1"&gt;Level&lt;/SPAN&gt; level = doc.GetElement( floor.LevelId ) &lt;SPAN class="cb2"&gt;as&lt;/SPAN&gt; &lt;SPAN class="cb1"&gt;Level&lt;/SPAN&gt;;
&amp;nbsp; &lt;SPAN class="cb2"&gt;double&lt;/SPAN&gt; elevation = level.Elevation;
&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 07:54:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-can-get-the-floor-elevation-and-beam-elevaton/m-p/5577016#M73017</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-04-09T07:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can get the Floor elevation and Beam elevaton?.</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-can-get-the-floor-elevation-and-beam-elevaton/m-p/5578269#M73018</link>
      <description>&lt;P&gt;Dear Jeremy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revit RevitLookup is a excellent tools and newly I am learning to use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;About my problem: First I need get Beam Elevation but not works the code. Which I am doing bad?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;The message:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" width="457" src="https://forums.autodesk.com/t5/image/serverpage/image-id/162999iB01B8E2352D80B5E/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="get_elevation_2.png" height="266" title="get_elevation_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;The code:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if (category == "Structural Framing")
                {
                    FilteredElementCollector collector = new FilteredElementCollector(m_revit.ActiveUIDocument.Document).OfClass(typeof(FamilyInstance));                    
                   
                    int i = 0;
                    foreach (FamilyInstance fi in collector)
                    {

                        if (fi.StructuralType == StructuralType.Beam)
                        {                            

                            //Get parameter "H" Height
                            Parameter family = fi.LookupParameter("Family");

                            if (family.AsValueString() == "Regular Rectangular Concreto")
                            {

                                //Get parameter "Tipo de Altura"                          
                                Parameter tipoAltura = fi.get_Parameter(new Guid("e9432adc-dbf1-48f2-b34e-20be6ab708e5"));                               

                                //Get parameter "Encofrado"
                                Parameter encofrado = fi.get_Parameter(new Guid("3bfb766d-e81e-4e39-98d0-046a606a17b3"));

                                //Get parameter "z Offset value"
                                Parameter zOffsetValue = fi.LookupParameter("z Offset Value");

                                //Get parameter "Peralte - H"
                                //Parameter H = fi.LookupParameter("H");

                                ElementId elemTypeId = fi.GetTypeId();
                                ElementType myType = (ElementType)m_revit.ActiveUIDocument.Document.GetElement(elemTypeId);

                                Parameter H = myType.LookupParameter("H");

                                //Get level the Beam ;
                                &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Level level = m_revit.ActiveUIDocument.Document.GetElement(&lt;FONT color="#0000FF"&gt;fi&lt;/FONT&gt;.LevelId) as Level;
                                double elevation = level.Elevation;
                                string elevationName = level.Name;   &lt;/STRONG&gt; &lt;/FONT&gt;                           

                                TaskDialog.Show("GYM-BIM", "Collector = " + fi.Name
                                                + "\nContador = " + i
                                                + "\nId =" + fi.Id
                                                + "\nzOffsetValue =" + ParameterToString(zOffsetValue)
                                                + "\nH =" + ParameterToString(H)
                                                + "\nLevel Value =" + &lt;FONT color="#0000FF"&gt;elevation&lt;/FONT&gt;
                                                + "\nLevel Name=" + &lt;FONT color="#0000FF"&gt;elevationName&lt;/FONT&gt;
                                 );                                
                                i++;
                            }


                        }

                        if (i == 30)
                        {

                            break;
                        }
                    }                    
                }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2015 20:09:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-can-get-the-floor-elevation-and-beam-elevaton/m-p/5578269#M73018</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-09T20:09:37Z</dc:date>
    </item>
  </channel>
</rss>

