<div dir="ltr"><div><div>Hi,<br></div><br>This code from the PyQGIS Developer CookBook seem to be deprecated.<br><br>layer = qgis.utils.iface.activeLayer()<br>layer.getLayerID()<br><br></div><div>The qgis-console return this error:<br>
<br>Traceback (most recent call last):<br>  File "<input>", line 1, in <module><br>AttributeError: 'QgsVectorLayer' object has no attribute 'getLayerID'<br><br></div><div>I'm start to learn the python in qgis.<br>
</div><div>Is there another choice for get the ID of active layer ?<br><br></div><div>Thx,<br><br></div><div>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty אטלעש<br>-----------------<br>
</div></div>