Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.
2020-09-15
02:52 PM
- last edited on
2021-09-14
01:46 PM
by
Noemi Balogh
2020-09-15 04:28 PM
2020-09-17 08:53 AM
GSErrCode makeRed(int id) { API_Attribute attrib; BNClear(attrib); attrib.header.typeID = API_MaterialID; attrib.header.index = API_AttributeIndex(id); if (auto err = ACAPI_Attribute_Get(&attrib); err != 0) { return err; } attrib.material.emissionAtt = 0; attrib.material.emissionRGB = API_RGBColor{0, 0, 0}; attrib.material.mtype = APIMater_GeneralID; attrib.material.specularPc = 74; attrib.material.transpAtt = 0; attrib.material.transpPc = 0; attrib.material.surfaceRGB = API_RGBColor{ 1, 0, 0 }; IO::Location loc; API_Texture texture; BNZeroMemory(&texture, sizeof(API_Texture)); attrib.material.texture = texture; return ACAPI_Attribute_Modify(&attrib, NULL); }I run this code and click somewhere in the UI very fast after I started it.
2020-09-17 10:48 AM
2020-09-18 08:45 AM
2020-09-18 10:07 AM
eziebarth wrote:I suspect the cause of the problem may be due to the VS toolset you're using. It's important to observe the system requirements for each API version, e.g.:
I tried it with Archicad 22, 23, and 24 on Windows. I compile with platform toolset Visual Studio 2019 (v142), C++20
These code findings are due to the fact that I removed some code from my example (of course made sure it still crashes).
2020-09-25 09:25 AM
2020-09-25 11:32 AM