ACAPI_ModulData_GetInfo returns APIERR_BADPARS [SOLVED]
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-06-30
09:05 AM
- last edited on
2023-08-01
02:51 PM
by
Doreena Deng
2014-06-30
09:05 AM
I tried running the following code which is based on the example given at ACAPI_ModulData_Get help:
Where did I go wrong? 
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".


~ReignBough~
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
Labels:
- Labels:
-
Add-On (C++)
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-06-30 11:05 AM
2014-06-30
11:05 AM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-06-30 11:35 AM
2014-06-30
11:35 AM
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.
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
ARCHICAD 27 INT (since AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-07-01 10:17 AM
2014-07-01
10:17 AM
ReignBough wrote:The earliest place for that is the Initialize function; before that the API interface is not fully set up.
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.
CheckEnvironment and RegisterInterface are both called during ArchiCAD start up.
Regards, Akos