Display malfunction of Graphisoft ID dashboard
Learn more
cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
ReignBough
Enthusiast

ACAPI_ModulData_GetInfo returns APIERR_BADPARS [SOLVED]

I tried running the following code which is based on the example given at ACAPI_ModulData_Get help:
API_ModulData info;
BNZeroMemory(&info, sizeof(API_ModulData));
GSErrCode err = ACAPI_ModulData_GetInfo(&info, "MyFirstDataBlock");
It returned APIERR_BADPARS which means "info parameter is NULL".

Where did I go wrong?
~ReignBough~
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
3 Replies 3
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

In this case APIERR_BADPARS error means the info parameter is NULL or your AddOn couldn't be loaded properly. Please check your MDID again, and check in Add-On Manager dialog if it shows any warnings/errors!

I tested this with ArchiCAD 17 INT 6540 FULL and it worked good. Soon I'll try it with your version also.

Regards,
Tibor
ReignBough
Enthusiast
Thanks Tibor.

I put this code on the CheckEnvironment() function. I was hoping to get the ModulData when the add-on loads.

It works perfectly when I put it on other 'non-required' function, though.
~ReignBough~
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
Akos Somorjai
Graphisoft
Graphisoft
ReignBough wrote:
Thanks Tibor.

I put this code on the CheckEnvironment() function. I was hoping to get the ModulData when the add-on loads.

It works perfectly when I put it on other 'non-required' function, though.
The earliest place for that is the Initialize function; before that the API interface is not fully set up.

CheckEnvironment and RegisterInterface are both called during ArchiCAD start up.

Regards, Akos

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!