yes I hope that works or ...will work perfectly
Jeff
I tested your solution, it works and thx
but its necessary to manage case when the active layer is locked.
- save layers state
- unlock all layers
- drawn something to get his layer
- restore layers state
as I explained before, I want to create too an odbx_setActiveLayer so I need to be sure that mine odbx_activeLayerName works too.
I have just modified it to get a .las file, i added :
(vla-export lsman layerStateName (strcat (vl-filename-directory (setq tmp (vla-get-name odbx))) "\\" (vl-filename-base tmp) ".las"))
in my dwg file, "Calque1" is the active layer, las file exported :
0
LAYERSTATEDICTIONARY
0
LAYERSTATE
1
20070321.11294341
91
1023
301
290
0
302
Calque1
8
Calque2
90
8
62
6
370
-3
6
Continuous
2
Color_6
8
Calque1
90
13
62
50
370
-3
6
Continuous
2
Color_50
8
0
90
8
62
7
370
-3
6
Continuous
2
Color_7
code 302 gives the active layer, to extract it I use :
(vlax-variant-value (nth 3 (vlax-safearray->list arrayXdataValue)))
but may be this code 302 is not always in fourth position, so could you post a las file to see differences?
TIA
(note : now, odbx is an argument of odbx_activeLayerName)
Bruno