这是indexloc提供的服务,不要输入任何密码
Skip to content

DXF file cannot read correct info about layer #1198

@zhouwei5872

Description

@zhouwei5872

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions