License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Archicad C++ API
About Archicad add-on development using the C++ API.

General Light Source Problem

Anonymous
Not applicable
Hello everyone:
I find that there are 7 types about General Light Sources in Archicad Library. But by light.type() in ModelerAPI, they only have 2 types: point light and spot light. I want to create a mapping table in my codes so that they have 3 types. So I want to know whether General Light Source has fixed value to represent it.
For General Light Sources, I try to use baseElemId to represent them. But I find that baseElemId may change when I reload them. baseElemId only is used to determine which lights in Archicad are in the same category. So I want to know whether General Light Sources have corresponding fixed values to represent them.
ULong u = baseElemId.operator GS::HashValue().hashValue;

Thank you.
1 REPLY 1
Anonymous
Not applicable
Add: my obtain way about baseElemId
ModelerAPI::BaseElemId baseElemId;
			GS::NonInterruptibleProcessControl processControl;
			elem.GetBaseElemId(&baseElemId,
				processControl,
				ModelerAPI::Element::EdgeColorInBaseElemId::NotIncluded,
				ModelerAPI::Element::PolygonAndFaceTextureMappingInBaseElemId::NotIncluded,
				ModelerAPI::Element::BodyTextureMappingInBaseElemId::NotIncluded,
				ModelerAPI::Element::EliminationInfoInBaseElemId::NotIncluded);
			ULong u = baseElemId.operator GS::HashValue().hashValue;