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.

How to access light intensity parameter?

Anonymous
Not applicable
Hello everybody!

Seems like I need to update additional parameters that are not part of the lamp structure.
Let's say I need to update light Intensity. We have API_LampType::lightColor -> API_RGBColor but I can't find intensity there.
It's not a light related parameter? If not, how am I supposed to access that particular parameter?


Thanks
3 REPLIES 3
Anonymous
Not applicable
Ok, now I see, this parameter is somehow linked with GDL object and for general light, it's clamped from 0..200.
So the better question, perhaps, is maybe how to access those GDL params??
Ralph Wessel
Mentor
Object parameters are stored in a separate memo structure. This allows you to avoid loading all the parameter data if you don't need it (for efficiency).

You can access this data directly using ACAPI_Element_GetMemo to fill the API_ElementMemo structure, but this is fairly complex for parameter access.

I think the best approach in your case is to use APIAny_GetActParametersID. The documentation for APIAny_OpenParametersID has some example code using this method that I think you will find useful.
Ralph Wessel BArch
Anonymous
Not applicable
Thanks, Ralph. I'll take a look!
Learn and get certified!