<?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: Set View Section Box to Match Scope Box - error pls explain in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/set-view-section-box-to-match-scope-box-error-pls-explain/m-p/7160900#M57679</link>
    <description>&lt;P&gt;Hi Akosi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Autodesk.Revit.DB.View3D.SectionBox&lt;/STRONG&gt; was removed in the 2015 API changes, see the documents &lt;STRONG&gt;&lt;A title="2015 api changes" href="http://www.revitapidocs.com/2015/news" target="_blank"&gt;&amp;gt; HERE &amp;lt;&lt;/A&gt;&lt;/STRONG&gt; for information/full list of changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can now use the &lt;STRONG&gt;SetSectionBox&lt;/STRONG&gt; method, which also takes a&amp;nbsp;&lt;STRONG&gt;BoundingBoxXYZ&lt;/STRONG&gt;. &amp;nbsp;The documentation for this method is accessible&amp;nbsp;&lt;STRONG&gt;&lt;A title="SetSectionBox" href="http://www.revitapidocs.com/2017/e21471cd-63a4-c452-8c29-fad41362a59b.htm" target="_blank"&gt;&amp;gt; HERE &amp;lt;&lt;/A&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That should get you going, good luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Cheers,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2017 08:23:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-19T08:23:13Z</dc:date>
    <item>
      <title>Set View Section Box to Match Scope Box - error pls explain</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-view-section-box-to-match-scope-box-error-pls-explain/m-p/7157303#M57678</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ive use and test Jeremy's code here&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2012/08/set-view-section-box-to-match-scope-box.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2012/08/set-view-section-box-to-match-scope-box.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and got&amp;nbsp;several errors. I managed to fix some of it but I don't understand what I need to do with this .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="setsectionboxerror.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/368055iE38A83D1960F7D14/image-size/large?v=v2&amp;amp;px=999" role="button" title="setsectionboxerror.png" alt="setsectionboxerror.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 13:05:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-view-section-box-to-match-scope-box-error-pls-explain/m-p/7157303#M57678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-16T13:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set View Section Box to Match Scope Box - error pls explain</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-view-section-box-to-match-scope-box-error-pls-explain/m-p/7160900#M57679</link>
      <description>&lt;P&gt;Hi Akosi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Autodesk.Revit.DB.View3D.SectionBox&lt;/STRONG&gt; was removed in the 2015 API changes, see the documents &lt;STRONG&gt;&lt;A title="2015 api changes" href="http://www.revitapidocs.com/2015/news" target="_blank"&gt;&amp;gt; HERE &amp;lt;&lt;/A&gt;&lt;/STRONG&gt; for information/full list of changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can now use the &lt;STRONG&gt;SetSectionBox&lt;/STRONG&gt; method, which also takes a&amp;nbsp;&lt;STRONG&gt;BoundingBoxXYZ&lt;/STRONG&gt;. &amp;nbsp;The documentation for this method is accessible&amp;nbsp;&lt;STRONG&gt;&lt;A title="SetSectionBox" href="http://www.revitapidocs.com/2017/e21471cd-63a4-c452-8c29-fad41362a59b.htm" target="_blank"&gt;&amp;gt; HERE &amp;lt;&lt;/A&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That should get you going, good luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Cheers,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 08:23:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-view-section-box-to-match-scope-box-error-pls-explain/m-p/7160900#M57679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T08:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set View Section Box to Match Scope Box - error pls explain</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-view-section-box-to-match-scope-box-error-pls-explain/m-p/7640507#M57680</link>
      <description>&lt;P&gt;Refer here for corrected code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2013/10/set-view-section-box-to-match-scope-box-for-revit-2014.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2013/10/set-view-section-box-to-match-scope-box-for-revit-2014.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is code to create a new view:&lt;/P&gt;&lt;PRE&gt;        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) {
            Autodesk.Revit.DB.Document doc = commandData.Application.ActiveUIDocument.Document;
            UIDocument uidoc = commandData.Application.ActiveUIDocument;

            ISelectionFilter iselfilterScopeBox = new ScopeBoxesSelectionFilter();
            Element eScopeBox = doc.GetElement(uidoc.Selection.PickObject(ObjectType.Element, iselfilterScopeBox, "Please select a Section Box"));

            View3D view3DCurrent = doc.ActiveView as View3D;
            if (view3DCurrent == null) {
                TaskDialog.Show("XXX", "Please use this command in a 3D view.");
                return Result.Failed;
            }

            BoundingBoxXYZ bbXYZScopeBox = GetSectionBoundingBoxFromScopeBox(eScopeBox, view3DCurrent.ViewDirection);
            ViewOrientation3D vieworientation3D = view3DCurrent.GetOrientation();
            using (Transaction t = new Transaction(doc, "Create View")) {
                t.Start();
                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 view3DNew = View3D.CreateIsometric(doc, viewFamilyType.Id);
                view3DNew.SetOrientation(vieworientation3D);
                view3DNew.SetSectionBox(bbXYZScopeBox);
                t.Commit();
                uidoc.ActiveView = view3DNew;
            }

            return Result.Succeeded;
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 04:26:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-view-section-box-to-match-scope-box-error-pls-explain/m-p/7640507#M57680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T04:26:03Z</dc:date>
    </item>
  </channel>
</rss>

