<?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: Python Error Message in Archicad Python API</title>
    <link>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Error-Message/m-p/263657#M647</link>
    <description>Hi Gerry,&lt;BR /&gt;
&lt;BR /&gt;
Thank you for reporting us this issue!&lt;BR /&gt;
This is certainly a bug in our API. Next time please report bugs at our Support Portal (&lt;A href="https://graphisoft.atlassian.net/servicedesk/customer/portal/5" target="_blank"&gt;&lt;LINK_TEXT text="https://graphisoft.atlassian.net/servic ... r/portal/5"&gt;https://graphisoft.atlassian.net/servicedesk/customer/portal/5&lt;/LINK_TEXT&gt;&lt;/A&gt;) or in email (&lt;A href="mailto: archicadapi@graphisoft.com"&gt;archicadapi@graphisoft.com&lt;/A&gt;), that way we can response faster.&lt;BR /&gt;
&lt;BR /&gt;
I wrote a script which detects ElementID conflicts and tries to generate unique ElementID for conflicted elements. Using this script I was able to reproduce your issue with the Archicad Hillside House Sample Project (&lt;A href="https://helpcenter.graphisoft.com/knowledgebase/103415/" target="_blank"&gt;https://helpcenter.graphisoft.com/knowledgebase/103415/&lt;/A&gt;) without using Teamwork.
&lt;PRE&gt;from archicad import ACConnection

conn = ACConnection.connect()
assert conn

acc = conn.commands
act = conn.types
acu = conn.utilities

elementIdPropertyId = acu.GetBuiltInPropertyId('General_ElementID')
elements = acc.GetAllElements()

newElemPropertyValues = []

idConflicts = {}
propertyValuesOfElements = acc.GetPropertyValuesOfElements(elements, [elementIdPropertyId])
for i in range(len(propertyValuesOfElements)):
	elementId = elements&lt;I&gt;.elementId
	elementPropertyValues = propertyValuesOfElements&lt;I&gt;
	for elementPropertyValue in elementPropertyValues.propertyValues:
		propertyValue = elementPropertyValue.propertyValue
		if propertyValue.value in idConflicts:
			idConflicts[propertyValue.value] += 1
			propertyValue.value += f' {idConflicts[propertyValue.value]}'
			newElemPropertyValues.append(act.ElementPropertyValue(elementId, elementIdPropertyId, propertyValue))
		else:
			idConflicts[propertyValue.value] = 1

result = acc.SetPropertyValuesOfElements(newElemPropertyValues)
print(result)&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

I added this to our bugfixing short-term backlog and I hope we can fix this issue soon.&lt;BR /&gt;
Identifier: DEF-1317 (Python API: SetPropertyValuesOfElements returns "TeamWork permission denied" error with Solo project)</description>
    <pubDate>Mon, 27 Jul 2020 09:00:51 GMT</pubDate>
    <dc:creator>Tibor Lorantfy</dc:creator>
    <dc:date>2020-07-27T09:00:51Z</dc:date>
    <item>
      <title>Python Error Message</title>
      <link>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Error-Message/m-p/263656#M646</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;In Working with Python API, I am trying to change some properties using:error_msg = acc.SetPropertyValuesOfElements(elemPropertyValues)&lt;BR /&gt;With one element, WC 23, I am getting the error message of:&lt;BR /&gt;&lt;BR /&gt;ERROR{'code':6001,'message':teamwork Permission Denied'}&lt;BR /&gt;&lt;BR /&gt;As a test, I am using the Archicad Sample House plan 23 which I opened in 24.There appear to be three WC23 in the plan. one on the first floor and two on the ground floor. My return says there are 4 objects, however&lt;BR /&gt;&lt;BR /&gt;Anyone know how to fix this?? I am not using teamwork.&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 08:32:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Error-Message/m-p/263656#M646</guid>
      <dc:creator>poco2013</dc:creator>
      <dc:date>2021-09-15T08:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python Error Message</title>
      <link>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Error-Message/m-p/263657#M647</link>
      <description>Hi Gerry,&lt;BR /&gt;
&lt;BR /&gt;
Thank you for reporting us this issue!&lt;BR /&gt;
This is certainly a bug in our API. Next time please report bugs at our Support Portal (&lt;A href="https://graphisoft.atlassian.net/servicedesk/customer/portal/5" target="_blank"&gt;&lt;LINK_TEXT text="https://graphisoft.atlassian.net/servic ... r/portal/5"&gt;https://graphisoft.atlassian.net/servicedesk/customer/portal/5&lt;/LINK_TEXT&gt;&lt;/A&gt;) or in email (&lt;A href="mailto: archicadapi@graphisoft.com"&gt;archicadapi@graphisoft.com&lt;/A&gt;), that way we can response faster.&lt;BR /&gt;
&lt;BR /&gt;
I wrote a script which detects ElementID conflicts and tries to generate unique ElementID for conflicted elements. Using this script I was able to reproduce your issue with the Archicad Hillside House Sample Project (&lt;A href="https://helpcenter.graphisoft.com/knowledgebase/103415/" target="_blank"&gt;https://helpcenter.graphisoft.com/knowledgebase/103415/&lt;/A&gt;) without using Teamwork.
&lt;PRE&gt;from archicad import ACConnection

conn = ACConnection.connect()
assert conn

acc = conn.commands
act = conn.types
acu = conn.utilities

elementIdPropertyId = acu.GetBuiltInPropertyId('General_ElementID')
elements = acc.GetAllElements()

newElemPropertyValues = []

idConflicts = {}
propertyValuesOfElements = acc.GetPropertyValuesOfElements(elements, [elementIdPropertyId])
for i in range(len(propertyValuesOfElements)):
	elementId = elements&lt;I&gt;.elementId
	elementPropertyValues = propertyValuesOfElements&lt;I&gt;
	for elementPropertyValue in elementPropertyValues.propertyValues:
		propertyValue = elementPropertyValue.propertyValue
		if propertyValue.value in idConflicts:
			idConflicts[propertyValue.value] += 1
			propertyValue.value += f' {idConflicts[propertyValue.value]}'
			newElemPropertyValues.append(act.ElementPropertyValue(elementId, elementIdPropertyId, propertyValue))
		else:
			idConflicts[propertyValue.value] = 1

result = acc.SetPropertyValuesOfElements(newElemPropertyValues)
print(result)&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

I added this to our bugfixing short-term backlog and I hope we can fix this issue soon.&lt;BR /&gt;
Identifier: DEF-1317 (Python API: SetPropertyValuesOfElements returns "TeamWork permission denied" error with Solo project)</description>
      <pubDate>Mon, 27 Jul 2020 09:00:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-Python-API/Python-Error-Message/m-p/263657#M647</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2020-07-27T09:00:51Z</dc:date>
    </item>
  </channel>
</rss>

