Got a minute? We appreciate your feedback:

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

How to get Sun Guid?

Anonymous
Not applicable
Hi. I'm trying to figure out how do I get the guid of the sun ( if this is even possible ? ). All that I've found is API_SunInfo which is not helpful for me, the 2nd approach is returning empty GS::Array.
Thanks for your assistance.

API_SunInfo sunInfo = {};
GSErrCode err2 = ACAPI_Environment( APIEnv_GetSunSetsID, &sunInfo, nullptr, nullptr );
My another try using elem list

GS::Array<API_Guid> elemList;
GSErrCode err = ACAPI_Element_GetElemList( API_SkylightID, &elemList, APIFilt_None, APIVarId_Skylight, APINULLGuid );
1 ACCEPTED SOLUTION
4 REPLIES 4

Akos Somorjai
Graphisoft
Graphisoft
Hi,

The sun is _not_ an ARCHICAD element, so the first option is the only way to go.

Best, Akos

Anonymous
Not applicable
Yes, but it returns just the API_SunInfo. Also, I can get SunSettings from the Modeler. But how can I obtain the Sun pointer/reference??

Akos Somorjai
Graphisoft
Graphisoft
Hi,

There's no sun object in ARCHICAD, it is a built-in entity. What kind of information would you like to obtain from that?

Best, Akos

Solution
Anonymous
Not applicable
My intention was to get the Sun for the Corona render element. I've got it covered now, thanks anyway!

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!