<?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: HELP: Get the Level ID of the element Beam (Structural Framing) with C# in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602154#M72841</link>
    <description>&lt;P&gt;Dear David,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologise too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And, by the way, your English is perfectly fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, I would interpret Revitalizers advice as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the beam level id is undefined, i.e. -1, it is pretty complicated or maybe impossible to determine a sensible alternative.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I would suggest giving up on that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you can sensibly do is determine the geometric location of the beam instance, and calculate between which levels it lies, even if those levels have not been assigned to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It really depends what you want this for.&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>Tue, 21 Apr 2015 23:03:14 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2015-04-21T23:03:14Z</dc:date>
    <item>
      <title>HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5597364#M72836</link>
      <description>&lt;P&gt;Hi everyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get the Level ID of the element Beam (Structural Framing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 'Revit Lookup' shows up -1 as a value. Where else can I find the Level ID of this element Beam?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG height="332" src="https://forums.autodesk.com/t5/image/serverpage/image-id/164431i416131FE2849BC6C/image-size/original?v=mpbl-1&amp;amp;px=-1" title="get_level_id.png" border="0" alt="get_level_id.png" width="705" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;foreach......

Level level = m_revit.ActiveUIDocument.Document.GetElement(&lt;FONT color="#FF0000"&gt;fi.LevelId&lt;/FONT&gt;) as Level;
                                double elevation = level.Elevation;
                                string elevationName = level.Name;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG height="202" src="https://forums.autodesk.com/t5/image/serverpage/image-id/164434i03AFC52278CC9815/image-size/original?v=mpbl-1&amp;amp;px=-1" title="get_level_id2.png" border="0" alt="get_level_id2.png" width="274" /&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>Fri, 17 Apr 2015 16:22:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5597364#M72836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-17T16:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5599326#M72837</link>
      <description>&lt;P&gt;Dear David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if LevelId property is not set properly, you need to get Element's Level by one of the parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since this may differ from class to class, you may search for different BuiltInParameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Walls: WALL_BASE_CONSTRAINT&lt;/P&gt;&lt;P&gt;Roofs: ROOF_BASE_LEVEL_PARAM&lt;/P&gt;&lt;P&gt;Floors: LEVEL_PARAM&lt;/P&gt;&lt;P&gt;Stairs: STAIRS_BASE_LEVEL_PARAM&lt;/P&gt;&lt;P&gt;Rooms and Areas: ROOM_LEVEL_ID&lt;/P&gt;&lt;P&gt;FamilyInstances: FAMILY_LEVEL_PARAM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These parameters could also be set to null, and if a Family is workplane based, you could better use SCHEDULE_LEVEL_PARAM since this is its only Level relation (except you want to get the Level by geometric evaluation, which is not a good idea).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Reitalizer&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 07:17:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5599326#M72837</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-04-20T07:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602032#M72838</link>
      <description>&lt;P&gt;Dear Reitalizer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much for respond.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can you give me an code example C# for get the Level ID of the element Beam (Structural Framing). I am using foreach for get the objects.&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;Regards&lt;BR /&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 21:30:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602032#M72838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-21T21:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602080#M72839</link>
      <description>&lt;P&gt;Dear David,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer explained to you how to proceed, and his explanation is clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot realistically expect him or anyone else to write your final code for you, unless you are willing to pay them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case, please contact Autodesk consulting for an estimate and a quote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this clarifies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 22:05:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602080#M72839</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-04-21T22:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602132#M72840</link>
      <description>&lt;P&gt;Dear Jeremy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, but three months ago I'm learning Revit API. I understand that you are over 15 years of experience, and for that reason, for you are clear explanation. I am developing an Add-in and only when there is like solving a specific issue request a code example to the forum. Normally aid means one or two specific lines of code. My intention is not to develop me all the Add-in. Furthermore, in the future I intend to share the knowledge learned in this community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I apologize because I recently learning English.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2015 22:38:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602132#M72840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-21T22:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602154#M72841</link>
      <description>&lt;P&gt;Dear David,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologise too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And, by the way, your English is perfectly fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, I would interpret Revitalizers advice as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the beam level id is undefined, i.e. -1, it is pretty complicated or maybe impossible to determine a sensible alternative.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I would suggest giving up on that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you can sensibly do is determine the geometric location of the beam instance, and calculate between which levels it lies, even if those levels have not been assigned to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It really depends what you want this for.&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>Tue, 21 Apr 2015 23:03:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602154#M72841</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-04-21T23:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602244#M72842</link>
      <description>&lt;P&gt;Dear Jeremy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your understanding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll take your advice and try to solve the problem with the geometric location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry but I can not understand why the ID of the beam level is -1. It is a configuration problem Revit?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 01:20:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602244#M72842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-22T01:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602338#M72843</link>
      <description>&lt;P&gt;Dear Frank,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The -1 means that the beam level id is not assigned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This may be a user error by whoever built the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may also be completely normal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It depends mon the user intention, workflow, and best practices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is an issue to be discussed with your BIM manager.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is not a configuration problem in Revit, just a normal usage error... or not an error at all, depending.&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>Wed, 22 Apr 2015 04:44:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602338#M72843</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-04-22T04:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602443#M72844</link>
      <description>&lt;P&gt;Dear Jeremy, dear David,&lt;BR /&gt;&lt;BR /&gt;sometimes level is reflected in LevelId, sometimes in a parameter.&lt;BR /&gt;Sometimes in none of them:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2011/01/family-instance-missing-level-property.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2011/01/family-instance-missing-level-property.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I've seen many different cases so far.&lt;BR /&gt;&lt;BR /&gt;In this case, what about about BuiltInParameter.INSTANCE_REFERENCE_LEVEL_PARAM, which reflects the "Reference Level" parameter visible in GUI properties ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 07:10:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5602443#M72844</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-04-22T07:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5604847#M72845</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to add my two cents worth, I am working on something that involves beams and i am writing the level (name) to a schedule. What i have done is just get the reference level parameter of the beam.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;foreach (Element e in new FilteredElementCollector(doc)
.OfClass(typeof(FamilyInstance))
.OfCategory(BuiltInCategory.OST_StructuralFraming))

Parameter mLevel = e.get_Parameter("Reference Level");
string level = pLevel.AsValueString();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if this helps in what you are trying to achieve with your add-in but thought i'd share.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 12:04:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5604847#M72845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-23T12:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5604994#M72846</link>
      <description>&lt;P&gt;Hi poleary,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;exactly, "Reference Level" is the equivalent to BuiltInParameter.INSTANCE_REFERENCE_LEVEL_PARAM.&lt;/P&gt;&lt;P&gt;Since parameter name can be language depending, it's better to use BuiltInParameter.&lt;/P&gt;&lt;P&gt;There are BuiltInParameter equvalents for each parameter except user defined ones, you can see it in its definition.&lt;/P&gt;&lt;P&gt;In my German Revit, same parameter is named "Referenzebene".&lt;/P&gt;&lt;P&gt;So just run your code in any non-English Revit to get an exception because parameter is null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nonetheless, thank you for your valid contribution!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 13:23:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5604994#M72846</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-04-23T13:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5605037#M72847</link>
      <description>&lt;P&gt;Thanks for the input Revitalizer. pretty new at this API stuff too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 13:31:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5605037#M72847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-23T13:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5651088#M72848</link>
      <description>&lt;P&gt;Hello everyone:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want first say thanks very much for you help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found the solution with the comment of the "poleary". I did some changes in the code for to find the Id of the beam:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#008000"&gt;//Get Level the element&lt;/FONT&gt;
Level level = m_revit.ActiveUIDocument.Document.GetElement(&lt;FONT color="#0000FF"&gt;referenceLevel.&lt;STRONG&gt;AsElementId()&lt;/STRONG&gt;&lt;/FONT&gt;) as Level;
                                double elevation = level.Elevation;
                                string elevationName = level.Name;&lt;/PRE&gt;
&lt;P&gt;With this code, is obtained the id of the beam.&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2015 19:58:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/5651088#M72848</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-25T19:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: HELP: Get the Level ID of the element Beam (Structural Framing) with C#</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/7625902#M72849</link>
      <description>&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get level from beam.. but I did not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution is my hope.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not understand&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;(&lt;FONT color="#0000FF"&gt;referenceLevel.AsElementId()&lt;/FONT&gt;)..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Whree can I find it?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Best regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hans&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 05:32:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/help-get-the-level-id-of-the-element-beam-structural-framing/m-p/7625902#M72849</guid>
      <dc:creator>hanseungjae</dc:creator>
      <dc:date>2017-12-15T05:32:40Z</dc:date>
    </item>
  </channel>
</rss>

