-
-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
Description
sample_2000.zip
(Added file IS a Test_data example program)
Question:
Object type: DWG_TYPE_LAYER
layer name 8: 0 ()
Object type: DWG_TYPE_LAYER
layer name 9: Tavolo 1
`for (int i = 0; i < dwg.num_objects; i++)
{
switch (dwg.object[i].fixedtype)
{
case DWG_TYPE_TEXT:
{
printf("Object type: TEXT\n");
if (obj->supertype == DWG_SUPERTYPE_ENTITY) {
// Dwg_Object_TEXT* text = obj->tio.entity->tio.TEXT;
Dwg_Entity_TEXT* text = dwg_object_to_TEXT(obj);
printf("%s\n", text->text_value);
int error;
char* name = dwg_ent_get_layer_name(obj->tio.entity, &error);
printf("DWG_TYPE_TEXT layer name = %s\r\n", name);
}
}
}`
The layer name always is "dwg.objects[8]" (first layer name). Entity "Text" is on LAYER 2 : Tavolo 1.