<?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: Changing Length with Python in Archicad Python API</title>
    <link>https://community.graphisoft.com/t5/Archicad-Python-API/Changing-Length-with-Python/m-p/319914#M117</link>
    <description>&lt;P&gt;Thank you. I guess i will start studying C++ or find a work around &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Nov 2021 23:41:16 GMT</pubDate>
    <dc:creator>Dayiz</dc:creator>
    <dc:date>2021-11-05T23:41:16Z</dc:date>
    <item>
      <title>Changing Length with Python</title>
      <link>https://community.graphisoft.com/t5/Archicad-Python-API/Changing-Length-with-Python/m-p/319559#M115</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been trying to edit walls with the Archicad Python Wrapper and i had success changing the 'General_Height'and 'General_Thickness' of a wall, but 'General_Length' appears to be a read-only property.&lt;/P&gt;
&lt;P&gt;It appears as 'General_Width' is tied to 'General_Thickness' and is not the right parameter.&lt;/P&gt;
&lt;P&gt;In my example projects the 'General_3DLength' corresponds to the actual length of the wall, but the property is read-only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is: Is it possible to change the length of a wall or am i limited to Height and Thickness?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My Code (excuse my variable names):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="python"&gt;from Archicad import ACConnection

conn = ACConnection.connect()
assert conn

acc = conn.commands
act = conn.types
acu = conn.utilities

singleWall = acc.GetElementsByType("Wall")

gHoheId = acu.GetBuiltInPropertyId("General_Height")
gBreiteId = acu.GetBuiltInPropertyId("General_Width")
g3DLangeId = acu.GetBuiltInPropertyId('General_3DLength')
gDickeId = acu.GetBuiltInPropertyId("General_Thickness")


wandHoheWert = act.NormalOrUserUndefinedPropertyValue('length', 'normal', 4.0)
wandBreiteWert = act.NormalOrUserUndefinedPropertyValue('length', 'normal', 4.0)
wand3DLangeWert = act.NormalOrUserUndefinedPropertyValue('length', 'normal', 4.0)
wandDickeWert = act.NormalOrUserUndefinedPropertyValue('length', 'normal', 4.0)
nH = act.ElementPropertyValue(singleWall[0].elementId, gHoheId, wandHoheWert)
nB = act.ElementPropertyValue(singleWall[0].elementId, gBreiteId, wandBreiteWert)
n3 = act.ElementPropertyValue(singleWall[0].elementId, g3DLangeId, wand3DLangeWert)
nD = act.ElementPropertyValue(singleWall[0].elementId, gDickeId, wandDickeWert)
rH = acc.SetPropertyValuesOfElements([nH])
rB = acc.SetPropertyValuesOfElements([nB])
rD = acc.SetPropertyValuesOfElements([nD])
r3 = acc.SetPropertyValuesOfElements([n3])
print(rH)
print(rB)
print(r3)
print(rD)

Console Output:

[SuccessfulExecutionResult {'success': True}]
[FailedExecutionResult {'success': False, 'error': {'code': 6800, 'message': 'Value of property definition is read-only (property definition guid: "3799B10A-61C5-4566-BF9C-EAA9CE49196E")'}}]
[FailedExecutionResult {'success': False, 'error': {'code': 6800, 'message': 'Value of property definition is read-only (property definition guid: "BA0E29BD-A795-4A93-A33F-C2C17B46C33A")'}}]
[SuccessfulExecutionResult {'success': True}]
&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Dear Regards&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;Dayiz&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 Nov 2021 18:51:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-Python-API/Changing-Length-with-Python/m-p/319559#M115</guid>
      <dc:creator>Dayiz</dc:creator>
      <dc:date>2021-11-05T18:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Length with Python</title>
      <link>https://community.graphisoft.com/t5/Archicad-Python-API/Changing-Length-with-Python/m-p/319604#M116</link>
      <description>&lt;P&gt;I believe that width and length are calculated values and can not be changed. Width refers to the set width of a composite or profile and would not make sense to change it. Length is the length of a wall as defined by its neig points Only the elements that these properties refer to can be changed through their info box(s) or the C++ API.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 18:43:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-Python-API/Changing-Length-with-Python/m-p/319604#M116</guid>
      <dc:creator>poco2013</dc:creator>
      <dc:date>2021-11-03T18:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Length with Python</title>
      <link>https://community.graphisoft.com/t5/Archicad-Python-API/Changing-Length-with-Python/m-p/319914#M117</link>
      <description>&lt;P&gt;Thank you. I guess i will start studying C++ or find a work around &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 23:41:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-Python-API/Changing-Length-with-Python/m-p/319914#M117</guid>
      <dc:creator>Dayiz</dc:creator>
      <dc:date>2021-11-05T23:41:16Z</dc:date>
    </item>
  </channel>
</rss>

