<?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 to retrieve a level id in active view? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10689996#M74621</link>
    <description>&lt;P&gt;You can do that whithout using LookupParameter method using only API methods and properties. No language problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Document doc = uiapp.ActiveUIDocument.Document;
View activeView = doc.ActiveView;
Level level = activeView.GenLevel;
ElementId levelId = level.Id;
string levelName = level.Name;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Oct 2021 05:59:46 GMT</pubDate>
    <dc:creator>guillain.jolivet</dc:creator>
    <dc:date>2021-10-15T05:59:46Z</dc:date>
    <item>
      <title>How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5450351#M74613</link>
      <description>&lt;P&gt;I want to create wall in the active view. Wall.Create() method has levelId. So how can I retrieve a level id in active view?&lt;/P&gt;&lt;P&gt;Thanx&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2014 08:49:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5450351#M74613</guid>
      <dc:creator>nur91m</dc:creator>
      <dc:date>2014-12-22T08:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5451063#M74614</link>
      <description>&lt;P&gt;Here is a quick macro I wrote that gets the active view's level id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public void ViewLevel()
{
	Document doc = ActiveUIDocument.Document;			
	View active = doc.ActiveView;
	ElementId levelId = null;
	
	Parameter level = active.LookupParameter("Associated Level");
	
	FilteredElementCollector lvlCollector = new FilteredElementCollector(doc);
	ICollection&amp;lt;Element&amp;gt; lvlCollection = lvlCollector.OfClass(typeof(Level)).ToElements();
	
	foreach (Element l in lvlCollection)
	{
		Level lvl = l as Level;				
		if(lvl.Name == level.AsString())
		{
			levelId = lvl.Id;
			//TaskDialog.Show("test", lvl.Name + "\n"  + lvl.Id.ToString());
		}
	}

}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2014 21:55:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5451063#M74614</guid>
      <dc:creator>Troy_Gates</dc:creator>
      <dc:date>2014-12-22T21:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5995097#M74615</link>
      <description>&lt;P&gt;If I want to add level name form the active view to the drop down list of the windows form How I do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example:- I creating addin after clicking the addin button it open the windows form.It contains the dropdown list. I want to add the name of the levels from the active view of the revit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 08:26:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5995097#M74615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-19T08:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5996683#M74616</link>
      <description>&lt;P&gt;I'm not sure why you would want to use a drop down list when there can only be one level per view. But in the example above,&amp;nbsp;you can use the first part to get the active view's level name...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Document doc = ActiveUIDocument.Document;			
View active = doc.ActiveView;
Parameter level = active.LookupParameter("Associated Level");
String levelName = level.AsString();&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jan 2016 01:03:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5996683#M74616</guid>
      <dc:creator>Troy_Gates</dc:creator>
      <dc:date>2016-01-20T01:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5996899#M74617</link>
      <description>&lt;P&gt;I am using drop down list because I creating addin which contains 2 dropdown list and one button. First drop down contains item "Join wall and column" and second drop down contain levels like (first floor level, second floor level etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select both item and click on button it only joins those wall and column which is in that level which I have been selected.&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>Wed, 20 Jan 2016 06:50:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/5996899#M74617</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-20T06:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10688648#M74618</link>
      <description>&lt;P&gt;Hi, I'm using a French version of Revit so I have to use "Niveau associé" in place of "Associated level". Is there a builtin parameter I can use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 15:51:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10688648#M74618</guid>
      <dc:creator>adcdao</dc:creator>
      <dc:date>2021-10-14T15:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10688654#M74619</link>
      <description>&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi, I'm using a French version of Revit so I have to use "Niveau associé" in place of "Associated level". Is there a builtin parameter I can use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Oct 2021 15:52:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10688654#M74619</guid>
      <dc:creator>adcdao</dc:creator>
      <dc:date>2021-10-14T15:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10688662#M74620</link>
      <description>&lt;P&gt;Hi, you should install Revit lookup plugin. You will snoop your wall parameters and then snoop the parameter you want, you will find a BuiltInParameter correspondance.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 15:55:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10688662#M74620</guid>
      <dc:creator>logimep</dc:creator>
      <dc:date>2021-10-14T15:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10689996#M74621</link>
      <description>&lt;P&gt;You can do that whithout using LookupParameter method using only API methods and properties. No language problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Document doc = uiapp.ActiveUIDocument.Document;
View activeView = doc.ActiveView;
Level level = activeView.GenLevel;
ElementId levelId = level.Id;
string levelName = level.Name;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 05:59:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10689996#M74621</guid>
      <dc:creator>guillain.jolivet</dc:creator>
      <dc:date>2021-10-15T05:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a level id in active view?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10690844#M74622</link>
      <description>&lt;P&gt;Thank you, it's working very well!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 12:59:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-retrieve-a-level-id-in-active-view/m-p/10690844#M74622</guid>
      <dc:creator>adcdao</dc:creator>
      <dc:date>2021-10-15T12:59:20Z</dc:date>
    </item>
  </channel>
</rss>

