Incorrect CHCopyC behavior?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-02-20
05:00 PM
- last edited on
‎2025-02-20
05:18 PM
by
Noemi Balogh
Good day folks. I have an issue with CHCopyC here.
Basically i have this expression:
CHCopyC(gdl_param.stringData.c_str(), reinterpret_cast<char*>(memo_param.value.uStr));
I use it to update the values of properties of elements. However, I got stuck with one particular property called: "Cover Sheet Type".
When I create an element, it is set to a correct value like "A10" or "A09" or else.
However, when I execute the expression above, I receive some nonsense.
Assume:
gdl_param.stringData = "A10";
and
memo_param.value.uStr = {<something>};
By ASCII, "A10" is 65, 49, 48. Hence I expect memo_param.value.uStr to contain {65, 49, 48}. Unfortunately that does not happen and I receive {12609, 49, 48}. I have no idea what "12609" should map to in ASCII, but that is definitely not correct.
The more interesting thing is that I have no problem with other string values. It is only the "Cover Sheet Type" parameter that causes this issue.
Had someone had such issue before and how did you resolve it? I'll be glad for your response! Thank you!
Operating system used: Windows 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-02-21 04:22 AM
You have posted this in the GDL forum (or it may have been moved there).
Is it actually an API/C++ question?
Barry.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-02-21 11:45 AM
Yes. I am not completely understanding the structure of topics and labels here. Like, I tried to find something very close related to the API and C++, but none were presented in the list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-02-21 12:21 PM
@Emkave we have a dedicated API board: https://community.graphisoft.com/t5/Archicad-C-API/bd-p/forum-ac-api
Noémi Balogh
Community Expert, Admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-02-21 12:22 PM
Thanks a lot!