dxf layer names

Is it possible to change how dxf file layers get their name during export? I would like to have layer names after -Definition Name- (name you give to the component). Right now I get correct layer names only after I open the -Entity Info- and copy the -Definition Name- to the -Name- box.

Forums: 

DXF layers

Can anybody suggest what line or piece of code to look for in ruby editor? I'm trying to create dynamic component which has copies attribute and that is generating -COPY OF- in front of every name and it will generate huge amount of layers in DXF after export.

Solution for the problem -

Solution for the problem - replace original code:

#Componentinstance entity

elsif( entity.typename == "ComponentInstance")

if entity.name==""

entity.name="COMPONENT"+$component_count.to_s

$component_count+=1

end

others = dxf_find_faces(others, entity.definition.entities, tform * entity.transformation, entity.name,dxf_option)

else

others = others + 1

With this code

#Componentinstance entity
      elsif( entity.typename == "ComponentInstance")
         if entity.name==""
           entity.name=""
         end
         others = dxf_find_faces(others, entity.definition.entities, tform * entity.transformation, entity.definition.name,dxf_option)

      else
         others = others + 1