We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

Error in Element_Test-Example?

Anonymous
Not applicable
Hello,

in the example Element_Test in Element_Basics.cpp there is a function "Do_CreateWindow()". When I try to use this function an error occurs at ACAPI_Element_CreateExt at the end of this function. The error is -2130313112 (APIERR_BADPARS).

Do I use this function wrong or is this an error in the function? How can it get resolved?
6 REPLIES 6
Anonymous
Not applicable
Did really nobody ever work with this function?

Does someone has a working example for creating a window?

Thanks, Andreas
Karl Ottenstein
Moderator
I know it worked several years ago, but haven't tried that one in a few years / versions. What is the version of the devkit that you are using?
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
I use the Development Kit 13.2517.
Anonymous
Not applicable
I got this error code when trying to modify Attribute with AttributeDefExt.

What dose it mean ?
2130313112
How I can debug this 'inconsistency' ?
dfintha
Graphisoft Alumni
Graphisoft Alumni
Hello,

The error code -2130313112, or APIERR_BADPARS means that you have given invalid or inconsistent parameters to an API function, and as such, the operation didn't succeed. I recommend looking into the API documentation of the function, which produces the error.

As for the ACAPI_Attribute_ModifyExt function, the most common causes of this error code is passing null pointers for required arguments.

You can find a comprehensive list of error codes and their meanings on the ARCHICAD API site.

Also, in the future, please refrain from reviving 8-year-old threads in the forum. You can always create a new thread, and ask for information there.

Best regards,
Dénes
Anonymous
Not applicable
Thanx, that was a case that actually passed object was empty the reason was in another part of the code.

I will create a new one. I was trying to find a solution on the forum and haven't checked it so old topic.