<?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: isolate elements in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5773592#M71055</link>
    <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN&gt;Revitalizer,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My initial objective was isolation. But now I will go other way round and try to hide a pair of element one in main doc and the other in lilnked doc. Any Ideas for acheiving this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sanjay Pandey&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2015 08:11:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-17T08:11:01Z</dc:date>
    <item>
      <title>isolate elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5769078#M71049</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can isolate a pair of elements via the following code if the elements are in the same document but if one of them is in linked doc the code does not isolates the element if its in a linked doc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IList&amp;lt;ElementId&amp;gt; ids = new List&amp;lt;ElementId&amp;gt;();&lt;/P&gt;&lt;P&gt;ids.Add(new ElementId(1);&lt;BR /&gt;ids.Add(new ElementId(2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ViewFamilyType viewFamilyType = (from v in new FilteredElementCollector(doc).&lt;BR /&gt;OfClass(typeof(ViewFamilyType)).&lt;BR /&gt;Cast&amp;lt;ViewFamilyType&amp;gt;()&lt;BR /&gt;where v.ViewFamily == ViewFamily.ThreeDimensional&lt;BR /&gt;select v).First();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;View3D view = null;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;view = View3D.CreateIsometric(doc, viewFamilyType.Id);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;view.IsolateElementsTemporary(ids);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;view.ConvertTemporaryHideIsolateToPermanent();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uidoc.ActiveView = view;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;doc.ActiveView.set_ProjColorOverrideByElement(ids, color);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;view.UnhideElements(ids);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sanjay Pandey&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, 13 Aug 2015 03:23:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5769078#M71049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-13T03:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: isolate elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5769249#M71050</link>
      <description>&lt;P&gt;Dear Sanjay,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code will be more legible if you use the 'Insert Code' button.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tested the isolate behaviour through the user interface?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does it behave in the way you wish there?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, it will probably not do so when driven programmatically either.&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, 13 Aug 2015 07:52:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5769249#M71050</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2015-08-13T07:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: isolate elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5770916#M71051</link>
      <description>&lt;P&gt;Thanks for a quick reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK now can I do the following as doing this manually in revit is possible:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have main doc and a linked doc. Now I select one element from main doc and one element from linked doc; I do a right click and Hide In View - Elements. Both the selected element gets hidden.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code doesn't help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;FilteredElementCollector links = new FilteredElementCollector(Command.doc).OfCategory(BuiltInCategory.OST_RvtLinks);
            foreach (Document d in Command.app.Documents)
            {

                coll = new FilteredElementCollector(d);
                coll.WherePasses(new LogicalOrFilter(new ElementIsElementTypeFilter(false), new ElementIsElementTypeFilter(true)));
                elemSet = new ElementSet();
                
                foreach (Element el in coll)
                {

                    try
                    {
                        if (el.Id == new ElementId(int.Parse(arrgotvals[0])) &amp;amp;&amp;amp; el.Id == new ElementId(int.Parse(arrgotvals[1])))
                        {
                           

                            IList&amp;lt;ElementId&amp;gt; ilds = new List&amp;lt;ElementId&amp;gt;();
                            ilds.Add(el.Id);

                            ICollection&amp;lt;ElementId&amp;gt; elemIdsColl = (ICollection&amp;lt;ElementId&amp;gt;)ilds.Cast&amp;lt;ElementId&amp;gt;().ToList();

                          

                            Command.doc.ActiveView.HideElements(ilds);

                        }
                    }
                    catch (Exception sd)
                    {

                        string fg = sd.ToString();
                    }

                }&lt;/PRE&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sanjay Pandey&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 03:20:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5770916#M71051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-14T03:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: isolate elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5771349#M71052</link>
      <description>&lt;P&gt;Hi sanjaymann,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is a rule:&lt;/P&gt;&lt;P&gt;if you cannot do it manually, you cannot do it via API (in 99.9% of the cases).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you select an Element in a linked file manually, all relating menue entries are disabled, thus you just cannot isolate it.&lt;/P&gt;&lt;P&gt;Testing that before asking would have taken just a second.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 12:07:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5771349#M71052</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-08-14T12:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: isolate elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5773469#M71053</link>
      <description>&lt;P&gt;Dear Revitalizer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish you had viewed my response after jeremy responded to it. What I am trying to acheive is; which revit is comfortable with. You can yourself try it out. So I hope this is achievable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sanjay Pandey&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 04:12:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5773469#M71053</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-17T04:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: isolate elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5773557#M71054</link>
      <description>&lt;P&gt;Dear sanjaymann,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do you want to &lt;EM&gt;hide&lt;/EM&gt; elements or do you want to &lt;EM&gt;isolate&lt;/EM&gt; them ?&lt;/P&gt;&lt;P&gt;The title of your thread is "isolate elements".&lt;/P&gt;&lt;P&gt;In the GUI, I can hide also elements in a linked file (as you did, too), but I cannot isolate them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, what I mentioned in my previous posting is still valid.&lt;/P&gt;&lt;P&gt;There is no solution for your problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 07:13:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5773557#M71054</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2015-08-17T07:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: isolate elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5773592#M71055</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN&gt;Revitalizer,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My initial objective was isolation. But now I will go other way round and try to hide a pair of element one in main doc and the other in lilnked doc. Any Ideas for acheiving this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sanjay Pandey&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 08:11:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/isolate-elements/m-p/5773592#M71055</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-17T08:11:01Z</dc:date>
    </item>
  </channel>
</rss>

