We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2020-07-22 01:39 PM - last edited on 2021-09-15 10:32 AM by Noemi Balogh
2020-07-27 11:00 AM
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.elementId elementPropertyValues = propertyValuesOfElements 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)I added this to our bugfixing short-term backlog and I hope we can fix this issue soon.