Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

GDL
About building parametric objects with GDL.

Incorrect CHCopyC behavior?

Emkave
Booster

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

4 REPLIES 4
Barry Kelly
Moderator

@Emkave 

You have posted this in the GDL forum (or it may have been moved there).

Is it actually an API/C++ question?

 

Barry.

One of the forum moderators.
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

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

Noemi Balogh
Community Admin
Community Admin

@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

Thanks a lot!

Setup info provided by author

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!