The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy, rmasaki

User avatar
By alexhajdu
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 :wink:
Last edited by alexhajdu on Fri Mar 20, 2020 2:02 pm, edited 1 time in total.
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?? :?:
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.