<?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 Try to Create associative Dimensions with tapir and claude in Archicad Python API</title>
    <link>https://community.graphisoft.com/t5/Archicad-Python-API/Try-to-Create-associative-Dimensions-with-tapir-and-claude/m-p/713911#M1192</link>
    <description>&lt;P&gt;Hi there !&lt;/P&gt;&lt;P&gt;I'm trying to&amp;nbsp;Create associative Dimensions with tapir and claude.&lt;/P&gt;&lt;P&gt;But Claude told he than was impossible for now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is his report :&lt;/P&gt;&lt;H1&gt;CreateAssociativeDimensions: witness points never resolve for Zone/Slab elements, and CreateAssociativeDimensionsOnSection always fails to find a valid section&lt;/H1&gt;&lt;P&gt;&lt;STRONG&gt;Tapir version:&lt;/STRONG&gt; 1.5.5 &lt;STRONG&gt;Archicad version:&lt;/STRONG&gt; 29 &lt;STRONG&gt;Tested via:&lt;/STRONG&gt; archicad-mcp (wraps TapirCommand.CreateAssociativeDimensions / CreateAssociativeDimensionsOnSection / GetDimensionData)&lt;/P&gt;&lt;H2&gt;Summary&lt;/H2&gt;&lt;P&gt;Two related issues with associative dimension creation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;CreateAssociativeDimensions witness points resolve correctly (real coordinates, correct dimensionValue) when elementId points to a &lt;STRONG&gt;Wall&lt;/STRONG&gt;, &lt;STRONG&gt;Line&lt;/STRONG&gt;, or &lt;STRONG&gt;Polyline&lt;/STRONG&gt;, using only elementId + inIndex (1 or 2 — the two endpoints of the element's own reference line). However, witness points &lt;STRONG&gt;never&lt;/STRONG&gt; resolve when elementId points to a &lt;STRONG&gt;Zone&lt;/STRONG&gt; or a &lt;STRONG&gt;Slab&lt;/STRONG&gt; — every combination of inIndex / nodeId / special / nodeType / nodeStatus I tried returns a witness coordinate of {0, 0} (and the created Dimension element is visually degenerate / invisible), even though the command itself reports success and returns a valid element GUID.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;CreateAssociativeDimensionsOnSection fails with "The referenced 'sectionElementId' is not a valid section element" for &lt;STRONG&gt;every&lt;/STRONG&gt; CutPlane element in the project I tested against — including sections that existed in the file before any scripting (not just ones created via CreateSections), and regardless of which ID I passed (the elementId returned by CreateSections, the navigatorItemId found via GetNavigatorItemTree, the databaseId returned by GetDatabaseIdFromNavigatorItemId, and the elementId returned by GetElementsByType("CutPlane") — all four candidates fail identically).&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H2&gt;Issue 1: witness points on Zone/Slab&lt;/H2&gt;&lt;H3&gt;Repro steps&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Create or select a Wall, and a Zone, in the same project.&lt;/LI&gt;&lt;LI&gt;Call CreateAssociativeDimensions with witnessPoints referencing the &lt;STRONG&gt;Wall&lt;/STRONG&gt;'s elementId, inIndex: 1 and inIndex: 2 (no other witness fields set). → Works. GetDimensionData on the result shows the witness coordinate matching the wall's begCoordinate/endCoordinate exactly, and dimensionValue equals the true distance.&lt;/LI&gt;&lt;LI&gt;Repeat the exact same call, but pointing elementId at a &lt;STRONG&gt;Zone&lt;/STRONG&gt; instead (inIndex: 1 / inIndex: 2, referencing the zone's first two polygonOutline vertices). → The command reports success and returns a valid Dimension GUID, but GetDimensionData shows both witness points with coordinate: {x: 0, y: 0}. The resulting Dimension is not visible in the model (confirmed via Get2DBoundingBoxes returning "Element not supported", and FitInWindow on the element falling back to a whole-project zoom instead of centering on any real geometry).&lt;/LI&gt;&lt;LI&gt;Same result for a &lt;STRONG&gt;Slab&lt;/STRONG&gt; element (tested with a slab whose polygonOutline matches the zone's, confirmed via GetDetailsOfElements).&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;What I tried on Zone/Slab witness points, all resulting in {0,0}&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;elementId only (all other fields omitted/null)&lt;/LI&gt;&lt;LI&gt;inIndex 0, 1, 2 (matching real vertex positions in polygonOutline)&lt;/LI&gt;&lt;LI&gt;inIndex + nodeId (1, 2)&lt;/LI&gt;&lt;LI&gt;inIndex + special (1, 2)&lt;/LI&gt;&lt;LI&gt;inIndex + nodeType (1, 2)&lt;/LI&gt;&lt;LI&gt;inIndex + line: true&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Additional confirmation this is Zone/Slab-specific, not a general witness bug&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;The exact same payload shape (elementId + inIndex only) works reliably and repeatedly on Wall, Line, and Polyline elements.&lt;/LI&gt;&lt;LI&gt;A manually-drawn dimension (native ArchiCAD dimension tool, snapped to a wall corner where two walls meet) resolves to the walls' real footprint corner (not the reference-line endpoint) — proving ArchiCAD itself can address that corner internally — but GetDimensionData does not expose the underlying witness parameters used, so this couldn't be reverse-engineered from an existing working dimension.&lt;/LI&gt;&lt;LI&gt;On the same wall used in that manually-drawn dimension, testing inIndex values up to 12 still only resolves for 1 and 2 (the reference-line endpoints) — never the real footprint corner.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Expected behavior&lt;/H3&gt;&lt;P&gt;Either: witness points should resolve for Zone/Slab elements the same way they do for Wall/Line/Polyline (ideally addressing each polygon vertex via inIndex), or the command/docs should clearly state that only certain element types support witness point addressing, and which inIndex/nodeType/etc. values are valid for each.&lt;/P&gt;&lt;H2&gt;Issue 2: CreateAssociativeDimensionsOnSection never finds a valid section&lt;/H2&gt;&lt;H3&gt;Repro steps&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;In a project with existing Section views (created natively, long before any scripting) and/or new ones created via CreateSections, call CreateAssociativeDimensionsOnSection with preset: "WallCompositeFaces" and a sectionElementId.&lt;/LI&gt;&lt;LI&gt;Tried as sectionElementId:&lt;UL&gt;&lt;LI&gt;The elementId returned directly by CreateSections&lt;/LI&gt;&lt;LI&gt;The navigatorItemId of the matching SectionItem found via GetNavigatorItemTree&lt;/LI&gt;&lt;LI&gt;The databaseId returned by GetDatabaseIdFromNavigatorItemId for that navigator item&lt;/LI&gt;&lt;LI&gt;The elementId of every CutPlane-type element returned by GetElementsByType("CutPlane") (7 sections in the test file, including natively pre-existing ones)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;All of the above return: {"error": {"code": -2130313112, "message": "The referenced 'sectionElementId' is not a valid section element."}}&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Expected behavior&lt;/H3&gt;&lt;P&gt;At least one of these four natural ID candidates should be accepted as a valid sectionElementId, given GetElementsByType("CutPlane") explicitly lists CutPlane as one of its supported enum values.&lt;/P&gt;&lt;H2&gt;Environment&lt;/H2&gt;&lt;UL&gt;&lt;LI&gt;Archicad 29&lt;/LI&gt;&lt;LI&gt;Tapir add-on 1.5.5&lt;/LI&gt;&lt;LI&gt;Windows&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Mon, 07 Sep 2026 08:54:02 GMT</pubDate>
    <dc:creator>Cyril Phelizon</dc:creator>
    <dc:date>2026-09-07T08:54:02Z</dc:date>
    <item>
      <title>Try to Create associative Dimensions with tapir and claude</title>
      <link>https://community.graphisoft.com/t5/Archicad-Python-API/Try-to-Create-associative-Dimensions-with-tapir-and-claude/m-p/713911#M1192</link>
      <description>&lt;P&gt;Hi there !&lt;/P&gt;&lt;P&gt;I'm trying to&amp;nbsp;Create associative Dimensions with tapir and claude.&lt;/P&gt;&lt;P&gt;But Claude told he than was impossible for now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is his report :&lt;/P&gt;&lt;H1&gt;CreateAssociativeDimensions: witness points never resolve for Zone/Slab elements, and CreateAssociativeDimensionsOnSection always fails to find a valid section&lt;/H1&gt;&lt;P&gt;&lt;STRONG&gt;Tapir version:&lt;/STRONG&gt; 1.5.5 &lt;STRONG&gt;Archicad version:&lt;/STRONG&gt; 29 &lt;STRONG&gt;Tested via:&lt;/STRONG&gt; archicad-mcp (wraps TapirCommand.CreateAssociativeDimensions / CreateAssociativeDimensionsOnSection / GetDimensionData)&lt;/P&gt;&lt;H2&gt;Summary&lt;/H2&gt;&lt;P&gt;Two related issues with associative dimension creation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;CreateAssociativeDimensions witness points resolve correctly (real coordinates, correct dimensionValue) when elementId points to a &lt;STRONG&gt;Wall&lt;/STRONG&gt;, &lt;STRONG&gt;Line&lt;/STRONG&gt;, or &lt;STRONG&gt;Polyline&lt;/STRONG&gt;, using only elementId + inIndex (1 or 2 — the two endpoints of the element's own reference line). However, witness points &lt;STRONG&gt;never&lt;/STRONG&gt; resolve when elementId points to a &lt;STRONG&gt;Zone&lt;/STRONG&gt; or a &lt;STRONG&gt;Slab&lt;/STRONG&gt; — every combination of inIndex / nodeId / special / nodeType / nodeStatus I tried returns a witness coordinate of {0, 0} (and the created Dimension element is visually degenerate / invisible), even though the command itself reports success and returns a valid element GUID.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;CreateAssociativeDimensionsOnSection fails with "The referenced 'sectionElementId' is not a valid section element" for &lt;STRONG&gt;every&lt;/STRONG&gt; CutPlane element in the project I tested against — including sections that existed in the file before any scripting (not just ones created via CreateSections), and regardless of which ID I passed (the elementId returned by CreateSections, the navigatorItemId found via GetNavigatorItemTree, the databaseId returned by GetDatabaseIdFromNavigatorItemId, and the elementId returned by GetElementsByType("CutPlane") — all four candidates fail identically).&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H2&gt;Issue 1: witness points on Zone/Slab&lt;/H2&gt;&lt;H3&gt;Repro steps&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Create or select a Wall, and a Zone, in the same project.&lt;/LI&gt;&lt;LI&gt;Call CreateAssociativeDimensions with witnessPoints referencing the &lt;STRONG&gt;Wall&lt;/STRONG&gt;'s elementId, inIndex: 1 and inIndex: 2 (no other witness fields set). → Works. GetDimensionData on the result shows the witness coordinate matching the wall's begCoordinate/endCoordinate exactly, and dimensionValue equals the true distance.&lt;/LI&gt;&lt;LI&gt;Repeat the exact same call, but pointing elementId at a &lt;STRONG&gt;Zone&lt;/STRONG&gt; instead (inIndex: 1 / inIndex: 2, referencing the zone's first two polygonOutline vertices). → The command reports success and returns a valid Dimension GUID, but GetDimensionData shows both witness points with coordinate: {x: 0, y: 0}. The resulting Dimension is not visible in the model (confirmed via Get2DBoundingBoxes returning "Element not supported", and FitInWindow on the element falling back to a whole-project zoom instead of centering on any real geometry).&lt;/LI&gt;&lt;LI&gt;Same result for a &lt;STRONG&gt;Slab&lt;/STRONG&gt; element (tested with a slab whose polygonOutline matches the zone's, confirmed via GetDetailsOfElements).&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;What I tried on Zone/Slab witness points, all resulting in {0,0}&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;elementId only (all other fields omitted/null)&lt;/LI&gt;&lt;LI&gt;inIndex 0, 1, 2 (matching real vertex positions in polygonOutline)&lt;/LI&gt;&lt;LI&gt;inIndex + nodeId (1, 2)&lt;/LI&gt;&lt;LI&gt;inIndex + special (1, 2)&lt;/LI&gt;&lt;LI&gt;inIndex + nodeType (1, 2)&lt;/LI&gt;&lt;LI&gt;inIndex + line: true&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Additional confirmation this is Zone/Slab-specific, not a general witness bug&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;The exact same payload shape (elementId + inIndex only) works reliably and repeatedly on Wall, Line, and Polyline elements.&lt;/LI&gt;&lt;LI&gt;A manually-drawn dimension (native ArchiCAD dimension tool, snapped to a wall corner where two walls meet) resolves to the walls' real footprint corner (not the reference-line endpoint) — proving ArchiCAD itself can address that corner internally — but GetDimensionData does not expose the underlying witness parameters used, so this couldn't be reverse-engineered from an existing working dimension.&lt;/LI&gt;&lt;LI&gt;On the same wall used in that manually-drawn dimension, testing inIndex values up to 12 still only resolves for 1 and 2 (the reference-line endpoints) — never the real footprint corner.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Expected behavior&lt;/H3&gt;&lt;P&gt;Either: witness points should resolve for Zone/Slab elements the same way they do for Wall/Line/Polyline (ideally addressing each polygon vertex via inIndex), or the command/docs should clearly state that only certain element types support witness point addressing, and which inIndex/nodeType/etc. values are valid for each.&lt;/P&gt;&lt;H2&gt;Issue 2: CreateAssociativeDimensionsOnSection never finds a valid section&lt;/H2&gt;&lt;H3&gt;Repro steps&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;In a project with existing Section views (created natively, long before any scripting) and/or new ones created via CreateSections, call CreateAssociativeDimensionsOnSection with preset: "WallCompositeFaces" and a sectionElementId.&lt;/LI&gt;&lt;LI&gt;Tried as sectionElementId:&lt;UL&gt;&lt;LI&gt;The elementId returned directly by CreateSections&lt;/LI&gt;&lt;LI&gt;The navigatorItemId of the matching SectionItem found via GetNavigatorItemTree&lt;/LI&gt;&lt;LI&gt;The databaseId returned by GetDatabaseIdFromNavigatorItemId for that navigator item&lt;/LI&gt;&lt;LI&gt;The elementId of every CutPlane-type element returned by GetElementsByType("CutPlane") (7 sections in the test file, including natively pre-existing ones)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;All of the above return: {"error": {"code": -2130313112, "message": "The referenced 'sectionElementId' is not a valid section element."}}&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Expected behavior&lt;/H3&gt;&lt;P&gt;At least one of these four natural ID candidates should be accepted as a valid sectionElementId, given GetElementsByType("CutPlane") explicitly lists CutPlane as one of its supported enum values.&lt;/P&gt;&lt;H2&gt;Environment&lt;/H2&gt;&lt;UL&gt;&lt;LI&gt;Archicad 29&lt;/LI&gt;&lt;LI&gt;Tapir add-on 1.5.5&lt;/LI&gt;&lt;LI&gt;Windows&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 07 Sep 2026 08:54:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-Python-API/Try-to-Create-associative-Dimensions-with-tapir-and-claude/m-p/713911#M1192</guid>
      <dc:creator>Cyril Phelizon</dc:creator>
      <dc:date>2026-09-07T08:54:02Z</dc:date>
    </item>
  </channel>
</rss>

