<?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 Writing MultiPatches in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/writing-multipatches/m-p/245442#M419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I encountered a problem when trying to use the MultiPatchShapeBuffer to write a multipatch geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that MultiPatchShapeBuffer.Setup(shapeType, numParts, numPoints) ignores the numParts and numPoints parameters, and creates a buffer with 0 parts and 0 points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following code snippet illustrates the issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp; FileGDBAPI::MultiPatchShapeBuffer buffer;

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Buffer: " &amp;lt;&amp;lt; (size_t)buffer.shapeBuffer &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.inUseLength &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.allocatedLength &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; FileGDBAPI::ShapeType shapeType = FileGDBAPI::shapeMultiPatch;
&amp;nbsp;&amp;nbsp; int numParts = 5;
&amp;nbsp;&amp;nbsp; int numPoints = 15;

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "shape type: " &amp;lt;&amp;lt; shapeType &amp;lt;&amp;lt; ", numParts: " &amp;lt;&amp;lt; numParts &amp;lt;&amp;lt; ", numPoints: " &amp;lt;&amp;lt; numPoints &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; fgdbError result = buffer.Setup(shapeType, numParts, numPoints);

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Result: " &amp;lt;&amp;lt; result &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Buffer: " &amp;lt;&amp;lt; (size_t)buffer.shapeBuffer &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.inUseLength &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.allocatedLength &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; buffer.GetShapeType(shapeType);
&amp;nbsp;&amp;nbsp; buffer.GetNumParts(numParts);
&amp;nbsp;&amp;nbsp; buffer.GetNumPoints(numPoints);

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "shape type: " &amp;lt;&amp;lt; shapeType &amp;lt;&amp;lt; ", numParts: " &amp;lt;&amp;lt; numParts &amp;lt;&amp;lt; ", numPoints: " &amp;lt;&amp;lt; numPoints &amp;lt;&amp;lt; std::endl;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 May 2011 22:34:41 GMT</pubDate>
    <dc:creator>ChrisScrimgeour</dc:creator>
    <dc:date>2011-05-18T22:34:41Z</dc:date>
    <item>
      <title>Writing MultiPatches</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/writing-multipatches/m-p/245442#M419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I encountered a problem when trying to use the MultiPatchShapeBuffer to write a multipatch geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that MultiPatchShapeBuffer.Setup(shapeType, numParts, numPoints) ignores the numParts and numPoints parameters, and creates a buffer with 0 parts and 0 points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following code snippet illustrates the issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp; FileGDBAPI::MultiPatchShapeBuffer buffer;

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Buffer: " &amp;lt;&amp;lt; (size_t)buffer.shapeBuffer &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.inUseLength &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.allocatedLength &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; FileGDBAPI::ShapeType shapeType = FileGDBAPI::shapeMultiPatch;
&amp;nbsp;&amp;nbsp; int numParts = 5;
&amp;nbsp;&amp;nbsp; int numPoints = 15;

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "shape type: " &amp;lt;&amp;lt; shapeType &amp;lt;&amp;lt; ", numParts: " &amp;lt;&amp;lt; numParts &amp;lt;&amp;lt; ", numPoints: " &amp;lt;&amp;lt; numPoints &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; fgdbError result = buffer.Setup(shapeType, numParts, numPoints);

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Result: " &amp;lt;&amp;lt; result &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Buffer: " &amp;lt;&amp;lt; (size_t)buffer.shapeBuffer &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.inUseLength &amp;lt;&amp;lt; ", " &amp;lt;&amp;lt; buffer.allocatedLength &amp;lt;&amp;lt; std::endl;

&amp;nbsp;&amp;nbsp; buffer.GetShapeType(shapeType);
&amp;nbsp;&amp;nbsp; buffer.GetNumParts(numParts);
&amp;nbsp;&amp;nbsp; buffer.GetNumPoints(numPoints);

&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "shape type: " &amp;lt;&amp;lt; shapeType &amp;lt;&amp;lt; ", numParts: " &amp;lt;&amp;lt; numParts &amp;lt;&amp;lt; ", numPoints: " &amp;lt;&amp;lt; numPoints &amp;lt;&amp;lt; std::endl;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 22:34:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/writing-multipatches/m-p/245442#M419</guid>
      <dc:creator>ChrisScrimgeour</dc:creator>
      <dc:date>2011-05-18T22:34:41Z</dc:date>
    </item>
  </channel>
</rss>

