We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2019-05-28 11:02 PM - last edited on 2022-10-04 04:31 PM by Daniel Kassai
strcpy(*memo.textContent, text); <my modification> // Test getting the memo of the existing text ACAPI_Element_GetMemo(element.header.guid, &memo, APIMemoMask_TextContent); CHtoUpper(*memo.textContent); JHP_Msg(*memo.textContent); // displays selected text with conversion to upper case </my modification> err = ACAPI_Element_Change(&element, &mask, &memo, APIMemoMask_TextContent, true); <my modification> if (err != NoError) // always true. { JHP_Msg("There is an error."); JHP_Msg((strerror(err))); // Error message in plain English is "Unknown error" } </my modification> ACAPI_DisposeElemMemoHdls(&memo);
2019-05-29 04:52 PM
return ACAPI_CallUndoableCommand("JHP Menu Command Function", [&]() -> GSErrCode {
2019-05-30 12:04 AM
2019-05-30 04:48 PM
2019-05-31 04:21 PM
chrisgilmer wrote:It might help if you think about it as a database transaction. Marking the beginning and end of a transaction allows that specific action to be rolled back, in this case by the user requesting an 'Undo'
Thanks for the insight Ralph. It just sounds a little counter-intuitive
2019-05-31 06:42 PM