<?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 Made a new 3DView. It's empty. Why? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285271#M47395</link>
    <description>&lt;P&gt;What is going on?&amp;nbsp; here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                ViewFamilyType viewFamilyType = (from v in new FilteredElementCollector(doc).OfClass(typeof(ViewFamilyType)).Cast&amp;lt;ViewFamilyType&amp;gt;()
                                                 where v.ViewFamily == ViewFamily.ThreeDimensional
                                                 select v).First();
                View3D view;
                using (Transaction t = new Transaction(doc, "Create Issues View"))
                {
                    t.Start();
                    view = View3D.CreateIsometric(doc, viewFamilyType.Id);

                    
                    t.Commit();
                }&lt;/PRE&gt;&lt;P&gt;It makes the new 3D view.&amp;nbsp; But there isn't anything in it.&amp;nbsp; Any help would be greatly appreciated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;(NOTE! When I iterate through all the objects found using a&amp;nbsp;FilteredElementCollector on that specific 3d View, it returns over 9000 elements with their respective ElementID's.&amp;nbsp; That means there is geometry in that view, but for some reason it's not visible in 3D.)&lt;/STRONG&gt;&lt;/EM&gt;&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>Fri, 21 Sep 2018 21:39:00 GMT</pubDate>
    <dc:creator>0001des</dc:creator>
    <dc:date>2018-09-21T21:39:00Z</dc:date>
    <item>
      <title>Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285271#M47395</link>
      <description>&lt;P&gt;What is going on?&amp;nbsp; here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                ViewFamilyType viewFamilyType = (from v in new FilteredElementCollector(doc).OfClass(typeof(ViewFamilyType)).Cast&amp;lt;ViewFamilyType&amp;gt;()
                                                 where v.ViewFamily == ViewFamily.ThreeDimensional
                                                 select v).First();
                View3D view;
                using (Transaction t = new Transaction(doc, "Create Issues View"))
                {
                    t.Start();
                    view = View3D.CreateIsometric(doc, viewFamilyType.Id);

                    
                    t.Commit();
                }&lt;/PRE&gt;&lt;P&gt;It makes the new 3D view.&amp;nbsp; But there isn't anything in it.&amp;nbsp; Any help would be greatly appreciated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;(NOTE! When I iterate through all the objects found using a&amp;nbsp;FilteredElementCollector on that specific 3d View, it returns over 9000 elements with their respective ElementID's.&amp;nbsp; That means there is geometry in that view, but for some reason it's not visible in 3D.)&lt;/STRONG&gt;&lt;/EM&gt;&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>Fri, 21 Sep 2018 21:39:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285271#M47395</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-09-21T21:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285557#M47396</link>
      <description>&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here is the Link you may need:&lt;/P&gt;&lt;P&gt;&lt;A href="https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/Revit-API/files/GUID-A7FA8DBC-830E-482D-9B66-147399524442-htm.html?_ga=2.66804973.2137010315.1527470650-214555019.1525755704" target="_blank"&gt;https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/Revit-API/files/GUID-A7FA8DBC-830E-482D-9B66-147399524442-htm.html?_ga=2.66804973.2137010315.1527470650-214555019.1525755704&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wish it is helpful for you &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;Best Regards,&lt;/P&gt;&lt;P&gt;Frank Liang&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="名片2.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/549179i6912C1320D7E51CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="名片2.png" alt="名片2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 03:52:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285557#M47396</guid>
      <dc:creator>BIM.Frankliang</dc:creator>
      <dc:date>2018-09-22T03:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285567#M47397</link>
      <description>&lt;P&gt;I would assume that regardless of the 3dView clipping plane and bounding box settings, it would allow me to zoom-to-fit on the objects in the view once the script has finished, right?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I orbit around the 3D View, there is still nothing in the view for me to find or select.&amp;nbsp; Perhaps I am mistaken about the clipping plane values, and the geometry is there, however, for some reason, i cannot see it.&amp;nbsp; I'll try to mess with these methods in the link you sent, and see what happens.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 04:55:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285567#M47397</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-09-22T04:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285588#M47398</link>
      <description>&lt;P&gt;Hi Friend，&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here is the key code in &lt;STRONG&gt;link&lt;/STRONG&gt; that could solve your question:&lt;/P&gt;&lt;PRE&gt; view3D.SetOrientation(viewOrientation3D)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wish it is helpful for you &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;Yours sincerely,&lt;/P&gt;&lt;P&gt;Frank Liang&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="名片2.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/549186i9363C19C8493235F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="名片2.png" alt="名片2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 05:32:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285588#M47398</guid>
      <dc:creator>BIM.Frankliang</dc:creator>
      <dc:date>2018-09-22T05:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285624#M47399</link>
      <description>&lt;P&gt;I tried various ViewOrientations and nothing appears in my view.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nothing is working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                ViewFamilyType viewFamilyType = (from v in new FilteredElementCollector(doc).OfClass(typeof(ViewFamilyType)).Cast&amp;lt;ViewFamilyType&amp;gt;()
                                                 where v.ViewFamily == ViewFamily.ThreeDimensional
                                                 select v).First();
                View3D view33 = null;
                using (Transaction tran2 = new Transaction(doc))
                {
                    if (tran2.Start("Make View") == TransactionStatus.Started)
                    {
                        view33 = View3D.CreateIsometric(doc, viewFamilyType.Id);
                        
                        

                        XYZ eye = new XYZ(10, 10, 10);
                        XYZ up = new XYZ(0, 0, 1);
                        XYZ forward = new XYZ(0, 1, 0);
                        

                        ViewOrientation3D viewOrientation3D = new ViewOrientation3D(eye, up, forward);
                        view33.SetOrientation(viewOrientation3D);
                        tran2.Commit();
                    }
                }&lt;/PRE&gt;&lt;P&gt;This seems really dumb and simple.&amp;nbsp; Does anyone have a simple portion of Revit API code that makes a 3D view, and has objects in it?&amp;nbsp; No links to someone else's site or distractions.&amp;nbsp; Just letters and words and semi-colons showing the proper way to make a 3D View in these API's?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've coded in CATIA, Rhino, AutoCAD, and Maya for years without any issues, but I've never had such trouble than when I want to do the simplest things in Revit.&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>Sat, 22 Sep 2018 06:33:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285624#M47399</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-09-22T06:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285651#M47400</link>
      <description>&lt;P&gt;Did you check the visibility settings of your view? You use any view type you find to create the view, so it might well be that you use a template where the things that matter to you are hidden. Type VV in the created view to check what is visible.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 07:04:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8285651#M47400</guid>
      <dc:creator>cwaluga</dc:creator>
      <dc:date>2018-09-22T07:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8289563#M47401</link>
      <description>&lt;P&gt;I've been able to show all objects, but through a rather convoluted way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's how I did it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run my script.&amp;nbsp; It collects the ID's of every object that causes the an error.&amp;nbsp; With that collection, I do the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make a transaction, make a CreateIsometric 3D view, name it.&amp;nbsp; (Code mentioned above).&lt;/P&gt;&lt;P&gt;Then I unhide all the elements in my "error" collection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;view33.UnhideElements(PILIDList);&lt;/PRE&gt;&lt;P&gt;Then I commit the transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to make this work for now, I use the visibilityCategory method to turn on all the Walls.&amp;nbsp; I want this to turn on all BIC's, but for now, I just have it for walls to get this dumb script done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Util.visibilityCategory(doc, categories, view33, BuiltInCategory.OST_Walls);&lt;/PRE&gt;&lt;P&gt;(While I have you, how can I include all categories, not just the walls, without making some sort of loop?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Onward,&lt;/P&gt;&lt;P&gt;I set the new 3D View as active:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;uiApp.ActiveUIDocument.ActiveView = view33;&lt;/PRE&gt;&lt;P&gt;Then I make a new transaction.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I collect all the elements in the view:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                        FilteredElementCollector CGM = new FilteredElementCollector(doc, view33.Id);
                        ICollection&amp;lt;ElementId&amp;gt; hh2 = CGM.ToElementIds();
                        List&amp;lt;ElementId&amp;gt; hh2List = (List&amp;lt;ElementId&amp;gt;)hh2;&lt;/PRE&gt;&lt;P&gt;Then I go through all the elements in a loop to determine if any object in the main view object collection is in my error loop.&amp;nbsp; If it is, I have a subroutine to return if it exists, and to skip it.&amp;nbsp; If it doesn't, then it hides the object using the HideElements method.&amp;nbsp; Since HideElements only takes a collection or list, then I have to make a temporary list in the loop to perform the hide operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                            if (IsInListElementID(PILIDList, hh2List[jkl]) == false)
                            {
                                //hide
                                try
                                {
                                    List&amp;lt;ElementId&amp;gt; hh2ListPre = new List&amp;lt;ElementId&amp;gt;();
                                    hh2ListPre.Add(hh2List[jkl]);
                                    view33.HideElements(hh2ListPre);
                                    hh2ListPre.Clear();
                                }
                                catch { }
                            }
                            else
                            {
                                //show
                                
                            }&lt;/PRE&gt;&lt;P&gt;Perhaps I could make a "RemoveOffendingIDsFromList()" subroutine so I could do the HideElements method, but for now, this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After all this, I use the UnhideElements to "show" all the objects that were in my "error" list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;view33.UnhideElements(PILIDList);&lt;/PRE&gt;&lt;P&gt;I commit this and it shows all the elements in the 3D View.&amp;nbsp; Or, it hides all the elements.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either way, &lt;STRONG&gt;all or nothing doesn't help me&lt;/STRONG&gt;.&amp;nbsp; I need a 3D view showing ONLY the objects in my "error" list.&amp;nbsp; Using these API's is like pulling teeth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here are my questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could my "error" objects be sub-objects, which when you hide/show the parent object, it hides everything underneath it regardless if the sub-object is "unhided?"&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why isn't UnhideElements showing my objects?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could my "error" objects not be able to hide/show via the API?&amp;nbsp; They are "error" objects because it does not allow me to modify parameters on them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My error objects happen to be parts of walls.&amp;nbsp; When I "show" the category of OST_Walls, does that "show" all the elements under a 3D wall, or does it just show parts of a wall, thus my "error" objects won't show up regardless?&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 22:42:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8289563#M47401</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-09-24T22:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8289620#M47402</link>
      <description>&lt;P&gt;Most of my objects are parts of a wall.&amp;nbsp; I have the ElementID of the "part" of the wall, but how do I get the parent wall ElementID?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 23:29:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8289620#M47402</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-09-24T23:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8290546#M47403</link>
      <description>&lt;P&gt;first of all, you might make a list of the error elements. We can then see the Revit classes to which the elements belong.&lt;/P&gt;&lt;PRE&gt;			List&amp;lt;ElementId&amp;gt; errorIds ;
			StringBuilder sb = new StringBuilder();
			foreach( ElementId id in errorIds)
			{
				Element e = doc.GetElement(id);
				sb.AppendLine(string.Format("&amp;lt;{0}&amp;gt; {1}  [{2}]",id, e.Name, e.GetType()));
			}
			TaskDialog.Show("debug", sb.ToString());&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you should make your own ViewFamilyType, without ViewTemplate so all elements are Visible on creation.&lt;/P&gt;&lt;P&gt;You can then hide all elements (that can be hidden) except the error elements.&lt;/P&gt;&lt;PRE&gt;			List&amp;lt;ElementId&amp;gt; errorIds ;
            ViewFamilyType viewFamilyType = (from v in new FilteredElementCollector(doc).OfClass(typeof(ViewFamilyType)).Cast&amp;lt;ViewFamilyType&amp;gt;()
                                                 where v.ViewFamily == ViewFamily.ThreeDimensional
                                                 select v).First();
            View3D view;
            using (TransactionGroup tg = new TransactionGroup(doc, "create Error View"))
            {
            	tg.Start();
		        using (Transaction t = new Transaction(doc, "Create Issues View"))
        	    {
            	    t.Start();
            	    // create new ViewFamilyType without ViewTemplate
            	    ViewFamilyType my_type = viewFamilyType.Duplicate("Error_View") as ViewFamilyType;
					my_type.get_Parameter(BuiltInParameter.DEFAULT_VIEW_TEMPLATE).Set(ElementId.InvalidElementId);
            	 
					view = View3D.CreateIsometric(doc, my_type.Id);

					// Hide DWG , Analytical Categories, Annotaion
            	    view.AreImportCategoriesHidden = true;
            	    view.AreAnalyticalModelCategoriesHidden = true;
            	    view.AreCoordinationModelHandlesHidden = true;
            	    view.AreAnnotationCategoriesHidden = true;
            	    // Hide RVT Links
            	    view.SetCategoryHidden(new ElementId(BuiltInCategory.OST_RvtLinks),true);
            	    // show Parts
            	    view.get_Parameter(BuiltInParameter.VIEW_PARTS_VISIBILITY).Set(2);
            	    t.Commit();
            	}
		        IEnumerable&amp;lt;Element&amp;gt; elemsInView = new FilteredElementCollector(doc,view.Id)
		        	.WhereElementIsNotElementType()
		        	.Excluding(errorIds);
		        List&amp;lt;ElementId&amp;gt; elemsToHide = new List&amp;lt;ElementId&amp;gt;();
		        foreach(Element e in elemsInView)
		        {
		        	if (e.CanBeHidden(view) ) elemsToHide.Add(e.Id);
		        }
		        using  (Transaction t = new Transaction(doc, "hide elements"))
		        {
		        	t.Start();
		        	view.HideElements(elemsToHide.ToList());
		        	t.Commit();
		        }
		        tg.Assimilate();
            }
            this.ActiveUIDocument.ActiveView = view;
            this.ActiveUIDocument.ShowElements(errorIds);&lt;/PRE&gt;&lt;P&gt;Last thing to check (if needed) Visibility of Worksets, turn on all worksets. [ view.&lt;SPAN&gt;SetWorksetVisibility&lt;/SPAN&gt;() ]&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 10:52:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8290546#M47403</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-09-25T10:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8292726#M47404</link>
      <description>&lt;P&gt;Thank you for your detailed answer.&amp;nbsp; I like your approach.&amp;nbsp; I'll see if I can port it over to my code, and make this work.&amp;nbsp; I have a few questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does this line mean:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// create new ViewFamilyType without ViewTemplate
            	    ViewFamilyType my_type = viewFamilyType.Duplicate("Error_View") as ViewFamilyType;
					my_type.get_Parameter(BuiltInParameter.DEFAULT_VIEW_TEMPLATE).Set(ElementId.InvalidElementId);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looks like we are duplicating the "first" view found via the filter criteria further up the code, so the file is basically taking an existing view and duplicating it.&amp;nbsp; Is that better than the "Create" method?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you are getting a parameter&amp;nbsp; and setting it to an ElementId enumeration of invalid element?&amp;nbsp; Why?&amp;nbsp; Is ElementId.InvalidElementId not an enumeration?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;view.get_Parameter(BuiltInParameter.VIEW_PARTS_VISIBILITY).Set(2);&lt;/PRE&gt;&lt;P&gt;What is this line doing exactly?&amp;nbsp; Why "2?"&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;I like this line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;		        IEnumerable&amp;lt;Element&amp;gt; elemsInView = new FilteredElementCollector(doc,view.Id)
		        	.WhereElementIsNotElementType()
		        	.Excluding(errorIds);&lt;/PRE&gt;&lt;P&gt;I see what you do later with checking the elements to make sure they are eligible for "hiding."&amp;nbsp; Too bad the filter can't have a ".CanBeHidden()" suffix to eliminate that.&amp;nbsp; But I'm sure it doesn't require a lot resources.&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;All of this is really good.&amp;nbsp; I'll try it out.&amp;nbsp; Aside from the "view.get_Parameter(BuiltInParameter...." coding, I have seen most of what you are providing, but never employed it in that way.&amp;nbsp; Much smarter looping and filtering in your suggestion than my original code, but I'm still negotiating how Revit works.&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;&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, 26 Sep 2018 03:38:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8292726#M47404</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-09-26T03:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8293567#M47405</link>
      <description>&lt;P&gt;&lt;FONT color="#800080"&gt;Why duplicate?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It is not duplicating a existing view, but duplicating a existing ViewFamilyType.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Because I don't know which elements are on the errorId list, I want to make sure that all elements are visible. A view has a ViewFamilyType. The ViewFamilyType can have a ViewTemplate (which regulates visibility / non-visibility of categories)&amp;nbsp; assigned to&amp;nbsp;it, that will be applied to newly created views. As I want all elements visible, I want to use a ViewFamilyType without a ViewTemplate. To avoid messing with the model, I duplicate the first ViewFamilyType found, and remove the ViewTemplate from it.&amp;nbsp; [&lt;EM&gt;my_type.get_Parameter(BuiltInParameter.DEFAULT_VIEW_TEMPLATE).Set(ElementId.InvalidElementId);&lt;/EM&gt;]&amp;nbsp; where ElementId.InvalidElementId is the equivalent to null for an ElementId-value. (== do not assign ViewTemplate)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Then I use this ViewFamilyType to create the 3D view.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#800080"&gt;&lt;SPAN&gt;BuiltInParameter.VIEW_PARTS_VISIBILITY&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Revit has the possibility to divide (system) families into Parts&amp;nbsp;&lt;A href="http://help.autodesk.com/view/RVT/2018/ENU/?guid=GUID-DA150C6B-996C-4C70-9E8C-3C536C232851" target="_blank"&gt;http://help.autodesk.com/view/RVT/2018/ENU/?guid=GUID-DA150C6B-996C-4C70-9E8C-3C536C232851&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;A view can show either the original element, the parts or both. By setting the BuiltinParameter to 2, I set the view to show the original element &lt;U&gt;and&lt;/U&gt; the parts.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 10:58:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8293567#M47405</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-09-26T10:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Made a new 3DView. It's empty. Why?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8296905#M47406</link>
      <description>&lt;P&gt;Thank you for the interesting discussion, and especially&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2083518"&gt;@FAIR59&lt;/a&gt;&amp;nbsp;for his very illuminating answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I summarised it for posterity here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2018/09/floor-area-above-room-and-mysterious-hide.html#3" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2018/09/floor-area-above-room-and-mysterious-hide.html#3&lt;/A&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:38:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/made-a-new-3dview-it-s-empty-why/m-p/8296905#M47406</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-27T13:38:29Z</dc:date>
    </item>
  </channel>
</rss>

