<?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: Check if Sectioning is enabled in Navisworks API Forum</title>
    <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8717307#M3431</link>
    <description>I managed to implement solution. Here is the complete snippet that can be used, it is implemented using JavaScriptSerializer, so no third party libraries are required. 

&lt;PRE&gt;
using System.Web.Script.Serialization; // add System.Web.Extensions reference to project 
private class ClipPlanes 
{ 
    public bool Enabled { get; set; } 
} 

private static bool IsSectioningEnabled()
 { 
    var serializer = new JavaScriptSerializer(); string clippingPlanesJson = Autodesk.Navisworks.Api.Application.ActiveDocument.ActiveView.GetClippingPlanes(); 
    var clippingPlanesParsed = serializer.Deserialize(clippingPlanesJson); 
    return clippingPlanesParsed.Enabled; 
}
&lt;/PRE&gt;</description>
    <pubDate>Tue, 09 Apr 2019 12:24:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-04-09T12:24:49Z</dc:date>
    <item>
      <title>Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8598003#M3423</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to check if Sectioning is enabled from .NET API?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried fetching window handle of Sectioning Tools tab in order to check if it is enabled but I did not have any success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking forward to your answers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind Regards,&lt;/P&gt;
&lt;P&gt;Nikola&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 08:24:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8598003#M3423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-15T08:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714952#M3424</link>
      <description>I did some digging on this because I needed to know this as well. If you call ActiveView.GetClippingPlanes() a JSON string is returned. Each plane in the set has an Enabled property, so you can check them this way plane-by-plane. You can also check the planes through the COM API, but this way didn't work for me because it counted even the planes that were disabled.</description>
      <pubDate>Mon, 08 Apr 2019 14:49:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714952#M3424</guid>
      <dc:creator>jmlovelace</dc:creator>
      <dc:date>2019-04-08T14:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714963#M3425</link>
      <description>EDIT: After further checking even this method is inconsistent. I turned some planes on and off and the JSON object does not change. Strange...</description>
      <pubDate>Mon, 08 Apr 2019 14:53:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714963#M3425</guid>
      <dc:creator>jmlovelace</dc:creator>
      <dc:date>2019-04-08T14:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714970#M3426</link>
      <description>I have encountered same issues as you. JSON object is not returning consistent results.  When you try to do same thing through COM API you will get the same inconsistent results.</description>
      <pubDate>Mon, 08 Apr 2019 14:57:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714970#M3426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-08T14:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714989#M3427</link>
      <description>I think I figured it out. The Enabled property of the JSON object is in fact reading correct...I had a bug in my code. You have to go by the Enabled property on each plane object, not the number of planes in the array. It looks like Navisworks is generating plane objects as needed when they are activated in the UI, but they don't disappear when deactivated - the Enabled property just gets set to false.</description>
      <pubDate>Mon, 08 Apr 2019 15:03:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8714989#M3427</guid>
      <dc:creator>jmlovelace</dc:creator>
      <dc:date>2019-04-08T15:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8715082#M3428</link>
      <description>Can you please post a snippet of code?</description>
      <pubDate>Mon, 08 Apr 2019 15:38:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8715082#M3428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-08T15:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8715095#M3429</link>
      <description>My code is being used to prepare a url string of section parameters but this is the gist. Requires Json.NET                

                string sectiondata = ActiveDoc.ActiveView.GetClippingPlanes();      
                dynamic parsedSection = JsonConvert.DeserializeObject(sectiondata);
                string sectionURLdata = "[";
                List&lt;STRING&gt; planeNums = new List&lt;STRING&gt;();
                if (parsedSection.Planes.Count &amp;gt; 0)
                {
                    foreach (var plane in parsedSection.Planes)
                    {
                        if (plane.Enabled.Value == true)
                        {
                            planeNums.Add(plane.Normal[0].Value.ToString());
                            planeNums.Add(plane.Normal[1].Value.ToString());
                            planeNums.Add(plane.Normal[2].Value.ToString());
                            planeNums.Add(plane.Distance.Value.ToString());
                        }
                    }
                }
                if (planeNums.Any())
                {
                    sectionURLdata += String.Join(",", planeNums);
                }
                sectionURLdata += "]";&lt;/STRING&gt;&lt;/STRING&gt;</description>
      <pubDate>Mon, 08 Apr 2019 15:46:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8715095#M3429</guid>
      <dc:creator>jmlovelace</dc:creator>
      <dc:date>2019-04-08T15:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8717094#M3430</link>
      <description>I managed to implement solution. Here is the complete snippet that can be used, it is implemented using JavaScriptSerializer, so no third party libraries are required.

using System.Web.Script.Serialization; // add System.Web.Extensions reference to project

                private class ClipPlanes
                {
                    public bool Enabled { get; set; }
                }

                private static bool IsSectioningEnabled()
                {
                    var serializer = new JavaScriptSerializer();

                    string clippingPlanesJson = Autodesk.Navisworks.Api.Application.ActiveDocument.ActiveView.GetClippingPlanes();
                    var clippingPlanesParsed = serializer.Deserialize&lt;CLIPPLANES&gt;(clippingPlanesJson);

                    return clippingPlanesParsed.Enabled;
                }&lt;/CLIPPLANES&gt;</description>
      <pubDate>Tue, 09 Apr 2019 10:42:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8717094#M3430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-09T10:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8717307#M3431</link>
      <description>I managed to implement solution. Here is the complete snippet that can be used, it is implemented using JavaScriptSerializer, so no third party libraries are required. 

&lt;PRE&gt;
using System.Web.Script.Serialization; // add System.Web.Extensions reference to project 
private class ClipPlanes 
{ 
    public bool Enabled { get; set; } 
} 

private static bool IsSectioningEnabled()
 { 
    var serializer = new JavaScriptSerializer(); string clippingPlanesJson = Autodesk.Navisworks.Api.Application.ActiveDocument.ActiveView.GetClippingPlanes(); 
    var clippingPlanesParsed = serializer.Deserialize(clippingPlanesJson); 
    return clippingPlanesParsed.Enabled; 
}
&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Apr 2019 12:24:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/8717307#M3431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-09T12:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/9339852#M3432</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN class=""&gt;ngrujic&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Wonder if you could help me. I am trying to use your code as it is. However, I am getting an issue with this line:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var clippingPlanesParsed = serializer.Deserialize(stringJson);&lt;/PRE&gt;&lt;P&gt;It keeps giving me the following error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"The type arguments for method 'JavaScriptSerializer.Deserialize&amp;lt;T&amp;gt;(string)' cannot be inferred from the usage. Try specifying the type arguments explicitly."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only way I can pass that line is by providing the method with a type in the following way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;object clippingPlanesParsed = serializer.Deserialize&amp;lt;object&amp;gt;(stringJson);&lt;/PRE&gt;&lt;P&gt;The problem is that now I have an "object" type and it won't take the parameter ".Enable" from the next line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any chance you found the same? And if so, could you shed me a light?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&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>Tue, 25 Feb 2020 11:35:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/9339852#M3432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-25T11:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/9341660#M3433</link>
      <description>&lt;P&gt;Avoid the JSON route: inefficient, undocumented format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Go direct to the LcOaClipPlaneSet clipping object:&lt;/P&gt;&lt;PRE&gt;var cps = NavisworksApp.ActiveDocument.State.GetCurrentClipPlaneSet();
bool enabled = cps.IsEnabled();&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Feb 2020 05:24:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/9341660#M3433</guid>
      <dc:creator>alexisDVJML</dc:creator>
      <dc:date>2020-02-26T05:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/13947340#M8345</link>
      <description>&lt;P&gt;Wow this is a great solution indeed.&lt;/P&gt;&lt;P&gt;Surprisingly it even works in Navisworks 2021 (API v18), even though State is undocumented for .NET Autodesk.Navisworks.Api.Application.ActiveDocument.&lt;/P&gt;&lt;P&gt;Many thanks for this insight!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 17:52:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/13947340#M8345</guid>
      <dc:creator>awingx</dc:creator>
      <dc:date>2025-12-16T17:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Sectioning is enabled</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/13948194#M8346</link>
      <description>&lt;P&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;State object contains A LOT of useful methods!&lt;BR /&gt;Worth looking at those, I use them in hundreds of places in our plugins.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Dec 2025 09:23:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/check-if-sectioning-is-enabled/m-p/13948194#M8346</guid>
      <dc:creator>alexisDVJML</dc:creator>
      <dc:date>2025-12-17T09:23:02Z</dc:date>
    </item>
  </channel>
</rss>

