<?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 GDL AddPar values (e.g. material override) to Railing sub-elements (Post/Rail/Panel/etc.) — in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Writing-GDL-AddPar-values-e-g-material-override-to-Railing-sub/m-p/709358#M10985</link>
    <description>&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;Hi,&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;I'm trying to programmatically change GDL library-part parameters (e.g. &lt;CODE&gt;bOverridePostSurface&lt;/CODE&gt; / &lt;CODE&gt;matPost&lt;/CODE&gt;) on &lt;STRONG&gt;Railing sub-elements&lt;/STRONG&gt; — Posts, Rails, Panels, etc. — identified by their own GUID (obtained via &lt;CODE&gt;ACAPI_Element_GetMemo_ExternalHierarchical&lt;/CODE&gt; / the equivalent subelement enumeration).&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;STRONG&gt;Reading works fine&lt;/STRONG&gt;: &lt;CODE&gt;ACAPI_Element_GetMemo(subElemGuid, &amp;amp;memo, APIMemoMask_AddPars)&lt;/CODE&gt; correctly returns the full AddPar list for a sub-element (e.g. 111 parameters for a Post, including &lt;CODE&gt;bOverridePostSurface&lt;/CODE&gt;/&lt;CODE&gt;matPost&lt;/CODE&gt;).&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;STRONG&gt;Writing does not work&lt;/STRONG&gt;, and I've been unable to find a supported path. What I've tried, each rejected cleanly (no crash, but no success):&lt;/DIV&gt;
&lt;OL style="text-align: left;" start="1"&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_LibraryPart_OpenParameters&lt;/CODE&gt;&amp;nbsp;(session-based) on the sub-element — fails outright; can't get a session open for this element type.&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_Element_Change(&amp;amp;element, &amp;amp;mask, &amp;amp;memo, APIMemoMask_AddPars, true)&lt;/CODE&gt;&amp;nbsp;directly on the sub-element's own guid —&amp;nbsp;&lt;CODE&gt;APIERR_BADPARS&lt;/CODE&gt;. (Tried both an empty mask and&amp;nbsp;&lt;CODE&gt;ACAPI_ELEMENT_MASK_SETFULL&lt;/CODE&gt;.)&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_Element_ChangeParameters(elemGuids, &amp;amp;element, &amp;amp;memo, &amp;amp;mask)&lt;/CODE&gt;&amp;nbsp;—&amp;nbsp;&lt;CODE&gt;APIERR_BADID&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_Element_ChangeExt&lt;/CODE&gt;&amp;nbsp;using&amp;nbsp;&lt;CODE&gt;API_SubElement&lt;/CODE&gt;&amp;nbsp;with&amp;nbsp;&lt;CODE&gt;subType = APISubElement_RailingPost&lt;/CODE&gt;, called on the owning top-level Railing element —&amp;nbsp;&lt;CODE&gt;APIERR_BADID&lt;/CODE&gt;, tried both with the sub-element's real GUID set and with the fully-populated&amp;nbsp;&lt;CODE&gt;API_Element&lt;/CODE&gt;&amp;nbsp;copied into&amp;nbsp;&lt;CODE&gt;subElem&lt;/CODE&gt;, indices left at&amp;nbsp;&lt;CODE&gt;subIndex = subSubIndex = 0&lt;/CODE&gt;. Same rejection both times.&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;I noticed &lt;CODE&gt;API_SubElementType&lt;/CODE&gt; defines &lt;CODE&gt;APISubElement_RailingPost&lt;/CODE&gt;, &lt;CODE&gt;RailingRail&lt;/CODE&gt;, etc., and &lt;CODE&gt;API_SubElement::subIndex&lt;/CODE&gt;/&lt;CODE&gt;subSubIndex&lt;/CODE&gt;'s field docs specifically mention Railing — but &lt;CODE&gt;API_SubElement&lt;/CODE&gt;'s own class-level description only lists Window/Door/Section/Elevation/InteriorElevation/ChangeMarker/CurtainWall as the element types supported by &lt;CODE&gt;ACAPI_Element_GetDefaultsExt&lt;/CODE&gt;/&lt;CODE&gt;ChangeDefaultsExt&lt;/CODE&gt;/&lt;CODE&gt;CreateExt&lt;/CODE&gt;/&lt;CODE&gt;ChangeExt&lt;/CODE&gt;. Railing isn't mentioned there, which would explain the consistent &lt;CODE&gt;APIERR_BADID&lt;/CODE&gt;.&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;I also confirmed there's no structural path through the parent: none of &lt;CODE&gt;API_RailingPostType&lt;/CODE&gt;/&lt;CODE&gt;API_RailingNodeType&lt;/CODE&gt;/&lt;CODE&gt;API_RailingSegmentType&lt;/CODE&gt;/etc. carry a &lt;CODE&gt;params&lt;/CODE&gt;/AddPar handle anywhere in the struct tree, so there's nothing to modify even via the parent Railing's own memo.&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;STRONG&gt;My question&lt;/STRONG&gt;: is writing AddPar values to a Railing sub-element currently supported by the public API at all, through any function? If &lt;CODE&gt;ACAPI_Element_ChangeExt&lt;/CODE&gt; is meant to support it, what are the correct semantics for &lt;CODE&gt;subIndex&lt;/CODE&gt;/&lt;CODE&gt;subSubIndex&lt;/CODE&gt; for &lt;CODE&gt;APISubElement_RailingPost&lt;/CODE&gt; specifically (segment index? node index? position within a pattern?), and does &lt;CODE&gt;subElem&lt;/CODE&gt;'s GUID matter at all, or is addressing purely index-based?&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;Thanks!&lt;/DIV&gt;
&lt;DIV style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="grey"&gt;Operating system used: &lt;EM&gt;Windows &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 21 Jul 2026 10:19:58 GMT</pubDate>
    <dc:creator>Mathias Jonathan</dc:creator>
    <dc:date>2026-07-21T10:19:58Z</dc:date>
    <item>
      <title>Writing GDL AddPar values (e.g. material override) to Railing sub-elements (Post/Rail/Panel/etc.) —</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Writing-GDL-AddPar-values-e-g-material-override-to-Railing-sub/m-p/709358#M10985</link>
      <description>&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;Hi,&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;I'm trying to programmatically change GDL library-part parameters (e.g. &lt;CODE&gt;bOverridePostSurface&lt;/CODE&gt; / &lt;CODE&gt;matPost&lt;/CODE&gt;) on &lt;STRONG&gt;Railing sub-elements&lt;/STRONG&gt; — Posts, Rails, Panels, etc. — identified by their own GUID (obtained via &lt;CODE&gt;ACAPI_Element_GetMemo_ExternalHierarchical&lt;/CODE&gt; / the equivalent subelement enumeration).&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;STRONG&gt;Reading works fine&lt;/STRONG&gt;: &lt;CODE&gt;ACAPI_Element_GetMemo(subElemGuid, &amp;amp;memo, APIMemoMask_AddPars)&lt;/CODE&gt; correctly returns the full AddPar list for a sub-element (e.g. 111 parameters for a Post, including &lt;CODE&gt;bOverridePostSurface&lt;/CODE&gt;/&lt;CODE&gt;matPost&lt;/CODE&gt;).&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;STRONG&gt;Writing does not work&lt;/STRONG&gt;, and I've been unable to find a supported path. What I've tried, each rejected cleanly (no crash, but no success):&lt;/DIV&gt;
&lt;OL style="text-align: left;" start="1"&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_LibraryPart_OpenParameters&lt;/CODE&gt;&amp;nbsp;(session-based) on the sub-element — fails outright; can't get a session open for this element type.&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_Element_Change(&amp;amp;element, &amp;amp;mask, &amp;amp;memo, APIMemoMask_AddPars, true)&lt;/CODE&gt;&amp;nbsp;directly on the sub-element's own guid —&amp;nbsp;&lt;CODE&gt;APIERR_BADPARS&lt;/CODE&gt;. (Tried both an empty mask and&amp;nbsp;&lt;CODE&gt;ACAPI_ELEMENT_MASK_SETFULL&lt;/CODE&gt;.)&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_Element_ChangeParameters(elemGuids, &amp;amp;element, &amp;amp;memo, &amp;amp;mask)&lt;/CODE&gt;&amp;nbsp;—&amp;nbsp;&lt;CODE&gt;APIERR_BADID&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;CODE&gt;ACAPI_Element_ChangeExt&lt;/CODE&gt;&amp;nbsp;using&amp;nbsp;&lt;CODE&gt;API_SubElement&lt;/CODE&gt;&amp;nbsp;with&amp;nbsp;&lt;CODE&gt;subType = APISubElement_RailingPost&lt;/CODE&gt;, called on the owning top-level Railing element —&amp;nbsp;&lt;CODE&gt;APIERR_BADID&lt;/CODE&gt;, tried both with the sub-element's real GUID set and with the fully-populated&amp;nbsp;&lt;CODE&gt;API_Element&lt;/CODE&gt;&amp;nbsp;copied into&amp;nbsp;&lt;CODE&gt;subElem&lt;/CODE&gt;, indices left at&amp;nbsp;&lt;CODE&gt;subIndex = subSubIndex = 0&lt;/CODE&gt;. Same rejection both times.&lt;/LI&gt;
&lt;LI style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;I noticed &lt;CODE&gt;API_SubElementType&lt;/CODE&gt; defines &lt;CODE&gt;APISubElement_RailingPost&lt;/CODE&gt;, &lt;CODE&gt;RailingRail&lt;/CODE&gt;, etc., and &lt;CODE&gt;API_SubElement::subIndex&lt;/CODE&gt;/&lt;CODE&gt;subSubIndex&lt;/CODE&gt;'s field docs specifically mention Railing — but &lt;CODE&gt;API_SubElement&lt;/CODE&gt;'s own class-level description only lists Window/Door/Section/Elevation/InteriorElevation/ChangeMarker/CurtainWall as the element types supported by &lt;CODE&gt;ACAPI_Element_GetDefaultsExt&lt;/CODE&gt;/&lt;CODE&gt;ChangeDefaultsExt&lt;/CODE&gt;/&lt;CODE&gt;CreateExt&lt;/CODE&gt;/&lt;CODE&gt;ChangeExt&lt;/CODE&gt;. Railing isn't mentioned there, which would explain the consistent &lt;CODE&gt;APIERR_BADID&lt;/CODE&gt;.&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;I also confirmed there's no structural path through the parent: none of &lt;CODE&gt;API_RailingPostType&lt;/CODE&gt;/&lt;CODE&gt;API_RailingNodeType&lt;/CODE&gt;/&lt;CODE&gt;API_RailingSegmentType&lt;/CODE&gt;/etc. carry a &lt;CODE&gt;params&lt;/CODE&gt;/AddPar handle anywhere in the struct tree, so there's nothing to modify even via the parent Railing's own memo.&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&lt;STRONG&gt;My question&lt;/STRONG&gt;: is writing AddPar values to a Railing sub-element currently supported by the public API at all, through any function? If &lt;CODE&gt;ACAPI_Element_ChangeExt&lt;/CODE&gt; is meant to support it, what are the correct semantics for &lt;CODE&gt;subIndex&lt;/CODE&gt;/&lt;CODE&gt;subSubIndex&lt;/CODE&gt; for &lt;CODE&gt;APISubElement_RailingPost&lt;/CODE&gt; specifically (segment index? node index? position within a pattern?), and does &lt;CODE&gt;subElem&lt;/CODE&gt;'s GUID matter at all, or is addressing purely index-based?&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="x_elementToProof" style="text-align: left; text-indent: 0px; white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em; font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;Thanks!&lt;/DIV&gt;
&lt;DIV style="font-family: Calibri,Helvetica,sans-serif; font-size: 12pt; color: #000000;"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="grey"&gt;Operating system used: &lt;EM&gt;Windows &lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Jul 2026 10:19:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Writing-GDL-AddPar-values-e-g-material-override-to-Railing-sub/m-p/709358#M10985</guid>
      <dc:creator>Mathias Jonathan</dc:creator>
      <dc:date>2026-07-21T10:19:58Z</dc:date>
    </item>
  </channel>
</rss>

