We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2007-06-29 02:29 PM - last edited on 2023-08-07 10:27 AM by Doreena Deng
... //element processing long g=0; g=elem.header.groupId; ACAPI_ELEMENT_MASK_CLEAR (mask); ACAPI_ELEMENT_MASK_SET (mask, API_TextType, head); elem.text.head.groupId=0; err = ACAPI_Element_Change (&elem, &mask, NULL, 0, true); ... // text object content change based on ACAPI_Goodies - APIAny_ChangeContentID. This works fine on non-grouped text elements. ACAPI_ELEMENT_MASK_CLEAR (mask); ACAPI_ELEMENT_MASK_SET (mask, API_TextType, head); elem.text.head.groupId=g; err = ACAPI_Element_Change (&elem, &mask, NULL, 0, true);The code above lies within an undo session.
2007-07-01 03:37 PM
Marius wrote:Marius,
Since the content field can't be changed while the object is in a group, the element must first get out of the group, apply the changes and then get back in.