<?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: Cann't hide elements in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983172#M40256</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You have a list of elements.&lt;/P&gt;
&lt;P&gt;Use&amp;nbsp;&lt;A href="https://www.revitapidocs.com/2020/887010c4-de58-96b6-0931-4c226e6b142b.htm" target="_blank" rel="noopener"&gt;CanBeHidden&lt;/A&gt;&amp;nbsp;method to check whether the element can be hidden.&lt;/P&gt;
&lt;P&gt;Create one more list and collect those elements which cannot be hidden.&lt;/P&gt;
&lt;P&gt;Examine the list and find out which element causes this error.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2019 08:42:32 GMT</pubDate>
    <dc:creator>naveen.kumar.t</dc:creator>
    <dc:date>2019-08-23T08:42:32Z</dc:date>
    <item>
      <title>Cann't hide elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983100#M40255</link>
      <description>&lt;P&gt;I tried to hide/show element in a view but I got the error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"One of the elments cannot be hidden. Parameter name:elementIdSet"&lt;/P&gt;&lt;P&gt;I used this piece of code befor to hide show text on a view but it is not working now. The model contain links also. What is the the wrong in this code:&lt;/P&gt;&lt;P&gt;List&amp;lt;ElementId&amp;gt; allId = new List&amp;lt;ElementId&amp;gt;();&lt;/P&gt;&lt;P&gt;//I add the elementsId in allId&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;view = (Autodesk.Revit.DB.View)doc.ActiveView;&lt;BR /&gt;// ss += view.Name + "\n";&lt;BR /&gt;MessageBox.Show("View " + view.Name);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;MessageBox.Show("View " + view.Name + " could not reviewed\n");&lt;BR /&gt;}&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;Transaction hide = new Transaction(doc, "Hide the elements");&lt;BR /&gt;hide.Start();&lt;BR /&gt;if(allId.Count&amp;gt;0)&lt;BR /&gt;view.HideElements(allId);&lt;/P&gt;&lt;P&gt;hide.Commit();&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;MessageBox.Show( "View " + view.Name + "can not be hiden \n"+ex.Message);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 08:03:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983100#M40255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T08:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't hide elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983172#M40256</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You have a list of elements.&lt;/P&gt;
&lt;P&gt;Use&amp;nbsp;&lt;A href="https://www.revitapidocs.com/2020/887010c4-de58-96b6-0931-4c226e6b142b.htm" target="_blank" rel="noopener"&gt;CanBeHidden&lt;/A&gt;&amp;nbsp;method to check whether the element can be hidden.&lt;/P&gt;
&lt;P&gt;Create one more list and collect those elements which cannot be hidden.&lt;/P&gt;
&lt;P&gt;Examine the list and find out which element causes this error.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 08:42:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983172#M40256</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2019-08-23T08:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't hide elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983219#M40257</link>
      <description>&lt;P&gt;Thank you for the answer. It works&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 09:05:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983219#M40257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T09:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cann't hide elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983244#M40258</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;If this helped solve your problem please mark it as a solution&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 09:14:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/cann-t-hide-elements/m-p/8983244#M40258</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2019-08-23T09:14:28Z</dc:date>
    </item>
  </channel>
</rss>

