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

Refresh Elements LibPart

stahL
Contributor

Hi everyone,

 

 

after I change params of a libPart the changes do not get updated in Archicad right away.

(Even after ReloadLibraries) 

 

 

ACAPI_LibPart_GetParams(libPart.index, &a, &b, &parNum, &params);
ACAPI_LibPart_GetSect_ParamDef(&libPart, params, &a, &b, nullptr, &paramsHdl);
ACAPI_LibPart_UpdateSection(libPart.index, &section, paramsHdl, nullptr);

 

 

Those parameters change the GDL's 3D Script (if/else), so the element needs to get the new parameters.
Can i force that refresh somehow?

 

Regards,

stahL

2 REPLIES 2
Ady84a
Booster

reloading the library won't update the parameters in the already placed objects. the new objects will get the modified parameters. for the already placed objects there are some ways to do that 

1. you can use the command "Run Parameter Script" on Placed Library Parts.

2. use the command reset the object settings to default.

there are other ways that were suggested in the following post 

https://community.graphisoft.com/t5/Developer-forum/Parameter-script-default-value/td-p/308414 

Akos Somorjai
Graphisoft
Graphisoft

Hello there,

Could please tell us if you want to update the library part itself or the placed instances?

Is this library part in the Embedded Library or at some other location in the file system where you can write to?

Do you receive any error code from any of the functions you listed?

Thanks, 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!