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;