<?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: Accessing Splitter.Sizes using API always throws exception in Fabrication CADmep Forum</title>
    <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/accessing-splitter-sizes-using-api-always-throws-exception/m-p/12028290#M5283</link>
    <description>Autodesk ADN responded that this has been put on their internal tracking list.</description>
    <pubDate>Mon, 12 Jun 2023 16:42:13 GMT</pubDate>
    <dc:creator>JeffYao28</dc:creator>
    <dc:date>2023-06-12T16:42:13Z</dc:date>
    <item>
      <title>Accessing Splitter.Sizes using API always throws exception</title>
      <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/accessing-splitter-sizes-using-api-always-throws-exception/m-p/12005625#M5278</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My accessing of the Sizes property of splitter object from job item always throws exception:System.NullReferenceException: 'Object reference not set to an instance of an object.'&lt;/P&gt;&lt;P&gt;The C# code snippet using Fabrication API is:&lt;/P&gt;&lt;P&gt;void TestSplitter()&lt;BR /&gt;{&lt;BR /&gt;string msg;&lt;BR /&gt;for (var i1 = 0; i1 &amp;lt; Job.Items.Count; i1++)&lt;BR /&gt;{&lt;BR /&gt;var item = Job.Items[i1];&lt;BR /&gt;for (var i2 = 0; i2 &amp;lt; item.Splitters.Count; i2++)&lt;BR /&gt;{&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;var splitter = item.Splitters[i2];&lt;BR /&gt;if (splitter != null)&lt;BR /&gt;{&lt;BR /&gt;// The statement below throws System.NullReferenceException: 'Object reference not set to an instance of an object.'&lt;BR /&gt;var sizes = splitter.Sizes;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;msg = ex.Message;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;This error was seen when running the code in CAMduct 2023.&lt;/P&gt;&lt;P&gt;Please find the MAJ Job from the attached zip file so you can open it in CAMduct and check its item splitters, as the attached screen shot shows.&lt;/P&gt;&lt;P&gt;Any idea what is wrong in my coding?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff Yao&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 21:00:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fabrication-cadmep-forum/accessing-splitter-sizes-using-api-always-throws-exception/m-p/12005625#M5278</guid>
      <dc:creator>JeffYao28</dc:creator>
      <dc:date>2023-06-01T21:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Splitter.Sizes using API always throws exception</title>
      <link>https://forums.autodesk.com/t5/fabrication-cadmep-forum/accessing-splitter-sizes-using-api-always-throws-exception/m-p/12028290#M5283</link>
      <description>Autodesk ADN responded that this has been put on their internal tracking list.</description>
      <pubDate>Mon, 12 Jun 2023 16:42:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fabrication-cadmep-forum/accessing-splitter-sizes-using-api-always-throws-exception/m-p/12028290#M5283</guid>
      <dc:creator>JeffYao28</dc:creator>
      <dc:date>2023-06-12T16:42:13Z</dc:date>
    </item>
  </channel>
</rss>

