1 #define DWG_TYPE DWG_TYPE_LIGHTLIST
2 #include "common.c"
3
4 void
api_process(dwg_object * obj)5 api_process (dwg_object *obj)
6 {
7 int error, isnew;
8 BITCODE_BS class_version;
9 BITCODE_BS i, num_lights;
10 Dwg_LIGHTLIST_light *lights;
11
12 Dwg_Version_Type dwg_version = obj->parent->header.version;
13 dwg_obj_lightlist *_obj = dwg_object_to_LIGHTLIST (obj);
14
15 CHK_ENTITY_TYPE (_obj, LIGHTLIST, class_version, BS);
16 CHK_ENTITY_TYPE (_obj, LIGHTLIST, num_lights, BS);
17 if (!dwg_dynapi_entity_value (_obj, "LIGHTLIST", "lights", &lights, NULL))
18 fail ("LIGHTLIST.lights");
19 for (i = 0; i < num_lights; i++)
20 {
21 CHK_SUBCLASS_UTF8TEXT (lights[i], LIGHTLIST_light, name);
22 CHK_SUBCLASS_H (lights[i], LIGHTLIST_light, handle);
23 }
24 }
25