BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

libPart_updateSection problems

Anonymous
Not applicable
Hello,

When I change a default value of a library part parameter for some strange reason the option 'set as default' on the library parts interface script is getting turned off. This is in AC v7.

My code basically does:

ACAPI_LibPart_GetSect_ParamDef(APILibObjectID, params, &a, &b, &paramsHdl);
memset(&section, 0 sizeof(API_LibPartSection));
section.sectType = API_SectParamDef;
ACAPI_LibPart_UpdateSection(libInd, &section, paramsHdl);

The default parameters for this library part get set just fine, but its annoying that this effects the interface script options.

Anyone know what I'm doing wrong, if this still happens in v9, or if there is a way to programmaticly set the 'use as default' option?

Thanks,
Adam
3 REPLIES 3
Oleg
Expert
I am not sure this helps, but did you

ACAPI_LibPart_SetDetails_ParamDef to the parameters handle ?

( You can get the details using ACAPI_LibPart_GetDetails )
Anonymous
Not applicable
I was not doing it before but just tried it and the option still gets disabled. API_LibPartDetails doesn't seem to have anything to do with this option, not that I can find anything else that does.

Thanks anyway,
Adam
Akos Somorjai
Graphisoft
Graphisoft
Hi Adam,
adambutler wrote:
I was not doing it before but just tried it and the option still gets disabled. API_LibPartDetails doesn't seem to have anything to do with this option, not that I can find anything else that does.

Thanks anyway,
Adam
The place for this would be in API_LibPartDetails, but it hasn't been published through that structure. We'll try to fix that in the next major release.

HTH,

Akos
Learn and get certified!