Hi Marko,
First of all, thanks for your reply.
The routine works well, but only with LWPOLYLINES.
In my drawings there are objects with the following features, which are not selected:
POLYLINE Layer: "0"
Space: Model space
Color: 7 (white) Linetype: "BYLAYER"
Handle = c11f2
Open
starting width 0.0000
ending width 0.0000
area 1359.5024
length 158.7602
VERTEX Layer: "0"
Space: Model space
Color: 7 (white) Linetype: "BYLAYER"
Handle = c11f3
at point, X=-18896.8696 Y=-2586.5831 Z= 0.0000
starting width 0.0000
ending width 0.0000
VERTEX Layer: "0"
Space: Model space
Color: 7 (white) Linetype: "BYLAYER"
Handle = c11f4
at point, X=-18871.8696 Y=-2586.5831 Z= 0.0000
starting width 0.0000
ending width 0.0000
VERTEX Layer: "0"
Space: Model space
Color: 7 (white) Linetype: "BYLAYER"
Handle = c11f5
at point, X=-18871.8696 Y=-2532.2030 Z= 0.0000
starting width 0.0000
ending width 0.0000
VERTEX Layer: "0"
Space: Model space